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: gdb 6.6 sim/erc32 does not parse -E option


Daniel Jacobowitz wrote:
On Thu, Feb 22, 2007 at 11:28:38AM -0600, Joel Sherrill wrote:
With this patch, gdb still passes a -E big to sim_open in the erc32
simulator code and there is nothing to parse it at that level.

It shouldn't do that. If it does, please show me a complete GDB session.

I double checked that the patch is applied and
had made clean before the last email.  Here is
the user's view:

$ ./gdb/gdb
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=sparc-rtems4.8".
(gdb) tar sim
unknown option -E
open of big failed
Connected to the simulator.
(gdb)


Here is a gdb of sparc-rtems-gdb:

....................................
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-linux-gnu --target=sparc-rtems4.8".
(gdb) tar sim


Breakpoint 1, sim_open (kind=SIM_OPEN_DEBUG, callback=0x828a6e0, abfd=0x0,
argv=0x885eb58) at ../../../gdb-6.6/sim/erc32/interf.c:191
191 sim_callback = callback;
(gdb) p argv[0]
$1 = 0x885ea58 "gdbsim"
(gdb) p argv[1]
$2 = 0x885ea68 "-E"
(gdb) p argv[2]
$3 = 0x885ea78 "big"
(gdb) p argv[3]
$4 = 0x0
(gdb)


I am not seeing much difference.  When I break in
remote-sim.c and step, this is what I see:

Breakpoint 1, gdbsim_open (args=Variable "args" is not available.
) at ../../gdb-6.6/gdb/remote-sim.c:506
506 strcpy (arg_buf, "gdbsim"); /* 7 */
(gdb) n
509 switch (selected_byte_order ())
(gdb)
512 strcat (arg_buf, " -E big");
(gdb)
522 if (selected_architecture_name () != NULL)
(gdb)
528 if (args)
(gdb) n
533 argv = buildargv (arg_buf);
(gdb)


Hopefully this helps.

--joel

--joel


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