This is the mail archive of the gdb@sourceware.cygnus.com 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]

Re: ARM/linux gdb stops and gives no info


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

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