diff options
author | gdb-3.4 <gdb@fsf.org> | 1989-11-05 21:02:37 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-06-03 15:36:32 +0100 |
commit | 1c997a4ae86938343edb715efc3fc742c5f668fe (patch) | |
tree | 9e3c70728a3987732436b7fa4b4cfef433a0669a /gdb/m-i386.h | |
parent | 4187119d59afd156703cfcbc6be287c5085f1867 (diff) | |
download | gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.zip gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.tar.gz gdb-1c997a4ae86938343edb715efc3fc742c5f668fe.tar.bz2 |
gdb-3.4
Diffstat (limited to 'gdb/m-i386.h')
-rw-r--r-- | gdb/m-i386.h | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/gdb/m-i386.h b/gdb/m-i386.h index 68df868..ff62a25 100644 --- a/gdb/m-i386.h +++ b/gdb/m-i386.h @@ -287,34 +287,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Return number of args passed to a frame. Can return -1, meaning no way to tell. */ -/* on the 386, the instruction following the call could be: - * popl %ecx - one arg - * addl $imm, %esp - imm/4 args; imm may be 8 or 32 bits - * anything else - zero args - */ -#define FRAME_NUM_ARGS(numargs, fi) { \ - int retpc; \ - unsigned char op; \ - struct frame_info *pfi; \ - pfi = get_prev_frame_info ((fi)); \ - retpc = pfi->pc; \ - numargs = 0; \ - op = read_memory_integer (retpc, 1); \ - if (op == 0x59) \ - /* pop %ecx */ \ - (numargs) = 1; \ - else if (op == 0x83) { \ - op = read_memory_integer (retpc+1, 1); \ - if (op == 0xc4) \ - /* addl $<signed imm 8 bits>, %esp */ \ - (numargs) = (read_memory_integer (retpc+2,1)&0xff)/4;\ - } else if (op == 0x81) { /* add with 32 bit immediate */\ - op = read_memory_integer (retpc+1, 1); \ - if (op == 0xc4) \ - /* addl $<imm 32>, %esp */ \ - (numargs) = read_memory_integer (retpc+2, 4) / 4;\ - } \ -} +#define FRAME_NUM_ARGS(numargs, fi) (numargs) = i386_frame_num_args(fi) /* Return number of bytes at start of arglist that are not really args. */ |