This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Backtrace prints wrong argument value
- From: Luis Machado <luisgpm at linux dot vnet dot ibm dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 16 May 2007 12:19:41 -0300
- Subject: Re: [patch] Backtrace prints wrong argument value
- References: <1177527233.12599.42.camel@localhost> <20070425191304.GA1283@caradoc.them.org> <1179293640.4323.16.camel@localhost> <20070516144250.GD24682@caradoc.them.org>
- Reply-to: luisgpm at linux dot vnet dot ibm dot com
> At every instruction after the move, the debug info should say that
> var is in r3. Right? No matter which location we pick here, while
> backtracing from abort, we'll print the wrong value for var and
> there's no point where the debug info will say it is undefined.
In such a case, the debug info would still say that the value is valid
and point to the "wrong" place, that's clearly a fault from DWARF's
side.
> If you want us to get this right using DWARF info, I believe your only
> choice is to approach the DWARF working group about it.
I believe this would be a better solution, but would require changes to
other toolchain projects and would surely take time. It could be
prohibitive right now.
> Now, in GDB we may have other options. We might be able to get the
> list of call clobbered registers based on the ABI. Compare with s390,
> which already does this (dwarf2_frame_set_init_reg). Does adding
> this to PowerPC help your example any?
I'll check this code. Thanks.
If there is a way to temporarily store those values that we know for
sure that will be wasted during the next inner frame's function
execution, we could recover them during backtrace. That could add some
complexity to the unwinding procedure though.
Regards,
Luis