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

Andrew Cagney
2003-02-19T18:05:37Z

>> You've the `observer' problem.
>
>
> Just like when you are sick, you already feel better when you know which
> disease you have contracted :).
>
>
>> 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.
>
>
> I need to update the task list every time the inferior stops and
> the control returns to the user. I think the `target change' event
> is not exactly what I would need?

The code relies on global state so I think `target changed' is better -
that way you know that your state is up-to-date. From memory, right now
we've actually memory_changed and registers_changed (I think they should
be merged). There is also a target run hook that insight uses.

> Do we have a list of currently supported events? Is there a framework
> for implementing these events?

That's the problem (you said sick), we've three:
- gdb-events
- chained hooks
- simple hooks
gdb-events started on the problem but lost direction.

Andrew