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]

[patch] Enable dwarf unwind for AVR target


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

Attachment: avr-enable-dwarf-unwind.patch
Description: avr-enable-dwarf-unwind.patch


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