diff options
author | Jim Blandy <jimb@codesourcery.com> | 2004-04-07 16:45:45 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2004-04-07 16:45:45 +0000 |
commit | 9872ad24c3d11b67a92be0e2b63398554b6dbb43 (patch) | |
tree | c8f3eceaceb06f7d214e78d3f5dc4b3ee3453d1b /gdb | |
parent | 1ba93119e8e3d0c01b44ad8317551e5b886783b0 (diff) | |
download | gdb-9872ad24c3d11b67a92be0e2b63398554b6dbb43.zip gdb-9872ad24c3d11b67a92be0e2b63398554b6dbb43.tar.gz gdb-9872ad24c3d11b67a92be0e2b63398554b6dbb43.tar.bz2 |
* i386-tdep.c (i386_stab_reg_to_regnum): Correct numbering for
%esp and %ebp
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7cc00a8..9129b7d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2004-04-07 Jim Blandy <jimb@redhat.com> + + * i386-tdep.c (i386_stab_reg_to_regnum): Correct numbering for + %esp and %ebp + 2004-04-07 Mark Kettenis <kettenis@gnu.org> * config/sparc/linux.mt (TDEPFILES): Remove solib-legacy.o. diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index b3a2793..cfe426d 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -211,8 +211,13 @@ i386_stab_reg_to_regnum (int reg) /* This implements what GCC calls the "default" register map. */ if (reg >= 0 && reg <= 7) { - /* General-purpose registers. */ - return reg; + /* General-purpose registers. The debug info calls %ebp + register 4, and %esp register 5. */ + if (reg == 4) + return 5; + else if (reg == 5) + return 4; + else return reg; } else if (reg >= 12 && reg <= 19) { |