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]

Re: [RFC] i386-tdep.c: Fix handling of ENTER instruction


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


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