This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: ARM/linux gdb stops and gives no info
- To: Fernando Nasser <fnasser at cygnus dot com>
- Subject: Re: ARM/linux gdb stops and gives no info
- From: Scott Bambrough <scottb at netwinder dot org>
- Date: Tue, 30 May 2000 16:30:29 -0400
- CC: rearnsha at arm dot com, Nicolas dot Thery at Symbian dot com, gdb at sourceware dot cygnus dot com
- Organization: Rebel.com
- References: <200005300948.KAA21133@cam-mail2.cambridge.arm.com> <3933C65A.CB1626B1@cygnus.com>
Fernando Nasser wrote:
>
> I quickly created the patch below. I have no time to test it these days.
> If you care applying it to your sources and trying I would appreciate.
> Otherwise it goes in my 25 pages long TODO list.. ;-)
I tested the following patch out in the mainline, and it seems to do the trick.
I will create a new RPM for GDB 5 with this patch today and put in on
netwinder.org for Richard.
Thanks Fernando,
Scott
> Index: infcmd.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/infcmd.c,v
> retrieving revision 1.1.1.17
> diff -c -p -r1.1.1.17 infcmd.c
> *** infcmd.c 2000/02/03 04:14:31 1.1.1.17
> --- infcmd.c 2000/05/30 13:42:23
> *************** char *gdb_register_names[] = REGISTER_NA
> *** 1494,1501 ****
> is required, (eg, for MIPS or Pyramid 90x, which both have
> lots of regs), or there is an existing convention for showing
> all the registers, define the macro DO_REGISTERS_INFO(regnum, fp)
> ! to provide that format. */
>
> #if !defined (DO_REGISTERS_INFO)
>
> #define DO_REGISTERS_INFO(regnum, fp) do_registers_info(regnum, fp)
> --- 1494,1504 ----
> is required, (eg, for MIPS or Pyramid 90x, which both have
> lots of regs), or there is an existing convention for showing
> all the registers, define the macro DO_REGISTERS_INFO(regnum, fp)
> ! to provide that format.
>
> + This default routine must work even if there is no selected_frame (== NULL).
> + Please don't add any dependencies on that being defined. */
> +
> #if !defined (DO_REGISTERS_INFO)
>
> #define DO_REGISTERS_INFO(regnum, fp) do_registers_info(regnum, fp)
> *************** registers_info (addr_exp, fpregs)
> *** 1617,1624 ****
> --- 1620,1633 ----
>
> if (!target_has_registers)
> error ("The program has no registers now.");
> +
> + #if !defined (DO_REGISTERS_INFO)
> + /* The default do_registers_info() does not need the selected_frame
> + so we don't test for it not being NULL. Tagets that define
> + DO_REGISTERS_INFO may rely on that, so we make sure it is valid. */
> if (selected_frame == NULL)
> error ("No selected frame.");
> + #endif
>
> if (!addr_exp)
> {
--
Scott Bambrough - Software Engineer
REBEL.COM http://www.rebel.com
NetWinder http://www.netwinder.org