This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] i386-tdep.c: Fix handling of ENTER instruction
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pierre Muller <muller at ics dot u-strasbg dot fr>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 7 Aug 2008 13:06:07 +0200
- Subject: Re: [RFC] i386-tdep.c: Fix handling of ENTER instruction
- References: <000c01c8d8ed$eb8a5760$c29f0620$@u-strasbg.fr>
Pierre,
> But I think that gdb, as a general purpose debugger,
> should handle the best it can, all instructions, even
> if only used rarely and more or less banned for some OS.
I agree.
> I have a few questions, about the test:
> 1) Are the names of the tests OK, or should I use simply
> i386-enter-XXX?
I think i386-enter is fine.
> 2) The current test only checks that main is in the backtrace,
> should I write something more precise or is this enough?
I think we should check that the entire backtrace is available.
> 2008-06-28 Pierre Muller <muller@ics.u-strasbg.fr>
>
> i386-tdep.c: (i386_analyze_frame_setup) Fix handling of
> enter instruction.
This part looks OK to me.
> 2008-06-28 Pierre Muller <muller@ics.u-strasbg.fr>
>
> gdb.base/i386-test-enter-s.S: New file.
> gdb.base/i386-test-enter.c: New file.
> gdb.base/i386-test-enter.exp: New test file.
For the testcase, you should take a look at gdb.arch/i386-prologue.c.
In particular, the symbol names you used in the assembly contain a
leading underscore which I suspect will not work on GNU/Linux.
Make sure to remember to include a copyright header in the C file
that only mentions 2008 and doesn't mention the bug-gdb email address.
> Index: gdb/testsuite/gdb.arch/i386-test-enter.exp
> ===================================================================
> RCS file: gdb/testsuite/gdb.arch/i386-test-enter.exp
> diff -N gdb/testsuite/gdb.arch/i386-test-enter.exp
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ gdb/testsuite/gdb.arch/i386-test-enter.exp 27 Jun 2008 14:05:22 -0000
> @@ -0,0 +1,78 @@
> +# Copyright 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
The copyright date should be 2008 only, I think.
--
Joel