avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] gdb-5.2.1 released


From: Theodore Roth
Subject: [avr-gcc-list] gdb-5.2.1 released
Date: Thu, 25 Jul 2002 10:30:40 -0600 (MDT)

Hi All,

For those that haven't noticed, gdb-5.2.1 has been released. Support for
avr is now available without the need for a patch.

To build for avr:

  $ ./configure --target=avr

You probably want to set --prefix too, but that up to you. ;-)

I'll try to make some rpms available soon.


Ted Roth


One caveat: The day before release I found a minor bug in gdb. My fix is
still pending review by gdb people so hasn't gone into the main line cvs
repo yet. My patch is attached if anyone needs it. The bug occurs when
setting a break point on a function when the function is a simple one for
which gcc has optimized out the prologue.

2002-07-19  Theodore A. Roth  <address@hidden>

        * gdb/avr-tdep.c(avr_skip_prologue): Return correct pc.

Index: gdb/avr-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/avr-tdep.c,v
retrieving revision 1.4
diff -u -p -r1.4 avr-tdep.c
--- gdb/avr-tdep.c      17 Jun 2002 23:32:27 -0000      1.4
+++ gdb/avr-tdep.c      19 Jul 2002 18:33:30 -0000
@@ -995,7 +995,12 @@ avr_skip_prologue (CORE_ADDR pc)
     {
       sal = find_pc_line (func_addr, 0);

-      if (sal.line != 0 && sal.end < func_end)
+      /* troth/2002-70-19: For some very simple functions, gcc doesn't
+         generate a prologue and the sal.end ends up being the insn (2 bytes)
+         before func_end (the address of the next func). By adjusting
+         func_end, we can catch these functions and return the correct pc. */
+
+      if (sal.line != 0 && sal.end < (func_end-2))
        return sal.end;
     }


avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]