This is the mail archive of the gdb-patches@sourceware.org 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: [patch] Backtrace prints wrong argument value


> 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


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