[patch] Enable dwarf unwind for AVR target
Sivanupandi, Pitchumani
Pitchumani.Sivanupandi@atmel.com
Mon Jan 4 08:01:00 GMT 2016
Hi All,
When analyzing regression failures for AVR target I found one unwinder issue
with.
Example: gdb.base/break.exp: step over breakpoint
AVR target in gdb has avr-frame unwinder and it doesn't enable dwarf unwinder.
Without dwarf unwinder, gdb could not unwind the stack and PC reliably.
Example:
1 int volatile a;
2 void main ()
3 {
4 a = 10;
5 printf ("%d\n", a);
6 a = 12;
7 }
avr-gcc test.c -mmcu=atmega1280 -g
When next command on line 5, gdb should move pc to line 6. But it stops at
printf function. GDB could not unwind frame from which the call printf
initiated and stops at printf as the source line changed.
CFA information is part of dwarf debug information that can be used to unwind
the stack and PC. But avr target do not enable the dwarf unwinder.
Attached patch enables the dwarf unwinder for avr target. Reported test case
and many 'step over' tests (such as break.exp) are passed now. There are few
regressions that are not analyzed. Before that I want to get the community
opinion about this fix.
Could you please review the patch?
Regards,
Pitchumani
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avr-enable-dwarf-unwind.patch
Type: application/octet-stream
Size: 5771 bytes
Desc: avr-enable-dwarf-unwind.patch
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20160104/99f37246/attachment.obj>
More information about the Gdb-patches
mailing list