This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re-initializing a list after the control returns to gdb...



I did it by inserting a call to ada_reset_tasks_list() inside
normal_stop(), like so:

*************** print_stop_reason (enum inferior_stop_re
*** 3360,3365 ****
--- 3362,3369 ----
void
normal_stop (void)
{
+ ada_reset_tasks_list (NULL);
+ /* As with the notification of thread events, we want to delay
notifying the user that we've switched thread context until
the inferior actually stops.


My testing shows that it seems to be working pretty well. But do you
think that this is a good idea? And does this change have any chance of
being accepted for inclusion (eventually, we are still ironing out some
wrinkles here and there to make our changes more acceptable, but hope to
be able to contribute our ada-language support changes soon)?

You've the `observer' problem.


GDB's observer code is very primative. A combination of gdb-events (needs direction) and chained hooks (see target_new_objfile_hook).

I suspect what you really want is a `target changed' event.

Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]