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...


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



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