Subject: Re: toolchain/32683: gdb can't step over strdup and co.
To: None <skrll@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: netbsd-bugs
Date: 03/12/2006 03:40:03
The following reply was made to PR toolchain/32683; it has been noted by GNATS.

From: "Valeriy E. Ushakov" <uwe@ptc.spbu.ru>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: toolchain/32683: gdb can't step over strdup and co.
Date: Sun, 12 Mar 2006 06:36:24 +0300

 Attached patch to i386nbsdelf_init_abi() fixes it for me.  Someone
 with a clue should check if we are missing here anything else
 vs. i386_svr4_init_abi().
 
 Index: i386nbsd-tdep.c
 ===================================================================
 RCS file: /cvsroot/src/gnu/dist/gdb/gdb/i386nbsd-tdep.c,v
 retrieving revision 1.2
 diff -u --unified -r1.2 i386nbsd-tdep.c
 --- i386nbsd-tdep.c	13 Jan 2005 12:31:09 -0000	1.2
 +++ i386nbsd-tdep.c	12 Mar 2006 03:30:05 -0000
 @@ -21,7 +21,9 @@
  
  #include "defs.h"
  #include "gdbtypes.h"
 +#include "inferior.h"
  #include "gdbcore.h"
 +#include "objfiles.h"
  #include "regcache.h"
  #include "arch-utils.h"
  
 @@ -276,8 +278,7 @@
    i386_elf_init_abi (info, gdbarch);
  
    /* NetBSD ELF uses SVR4-style shared libraries.  */
 -  set_gdbarch_in_solib_call_trampoline (gdbarch,
 -                                        generic_in_solib_call_trampoline);
 +  set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
    set_solib_svr4_fetch_link_map_offsets (gdbarch,
  				 nbsd_ilp32_solib_svr4_fetch_link_map_offsets);
  
 
 -uwe