This is the mail archive of the insight@sourceware.org mailing list for the Insight 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: Can't debug x86_64 C++ programs.


John Fine wrote:

So I wasted lots of time trying to use
fprintf_unfiltered (gdb_stdlog,

Then I realized most of those were just trying to pop up in a window when Insight crashed, so I would never get to see them.

Yeah, the *_unfilitered and *_filtered all head through uiout, which are redirected to insight and tcl/tk. As you discovered, you need to use "normal" printfs.


I think architecture_changed_event OUGHT to call setup_architecture_data, but I can't tell from the source code what it actually does or who calls setup_architecture_data.

Here's what going on. When you load your x86_64 executable, gdb notices that this is different from the current i386 architecture, so it changes the current architecture to i386:x86_64. When this is changed, an observer notification is fired off from deprecated_current_gdbarch_select_hack (deprecated? I guess gdb doesn't want anyone to know that the architecture has changed??).


Insight registers gdbtk_architecture_changed as the observer callback. This then calls the Tcl procedure gdbtk_tcl_architecture_changed, which dispatches this event to the windows. The register window is currently the only window that does anything with this event.

It calls the proc gdb_reg_arch_changed, which is aliased to the C function setup_architecture_data. [Phew!] So, alas, setup_architecture_data *is* being called.

This will require further investigation.

Keith


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