Hi there, perhaps you solve it by: add-sym-file $HOSTPATH/yoursharedobject.so. GDB then tries to extract the symbol information from that file and appends it to the existing symbol information. Yours, vw ( Veit Wehner )
Dheeraj V.S. wrote: > > Hi, > I'm remote debugging on an ARM target using gdb 6.5. > I'm unable to step into functions that are defined inside shared libraries > although the identical .so file is accessible both by the host and target. > > These are the test programs used: > linux:/home/dheeraj # cat gdb_test.c > #include <stdio.h> > > void function () > { > printf ("In function\n"); > } > > extern void function_in_lib(); > > int main () > { > printf ("In main\n"); > function(); > function_in_lib(); > printf ("Quitting\n"); > return 0; > } > > linux:/home/dheeraj # cat gdb_test_lib.c > #include <stdio.h> > void function_in_lib () > { > printf ("In function_in_lib\n"); > } > > The following is the output of gdb 6.5: > Note the lines with the arrows (<----) > > linux:/home/dheeraj # arm-unknown-linux-gnu-gdb > GNU gdb 6.5 > This GDB was configured as "--host=i686-pc-linux-gnu > --target=arm-unknown-linux-gnu". > (gdb) set solib-absolute-prefix /home/dheeraj > (gdb) set solib-search-path /home/dheeraj > (gdb) file gdb_test > Reading symbols from /home/dheeraj/gdb_test...done. > (gdb) b main > Breakpoint 1 at 0x8630: file gdb_test.c, line 12. > (gdb) target remote 10.18.21.35:3456 > Remote debugging using 10.18.21.35:3456 > 0x40000ba0 in ?? () > (gdb) c > Continuing. > > Breakpoint 1, main () at gdb_test.c:12 > 12 printf ("In main\n"); > (gdb) n > Cannot access memory at address 0x0 <---- Problem?? > 13 function(); > (gdb) s > function () at gdb_test.c:5 <---- Stepping inside the same file is OK. > 5 printf ("In function\n"); > (gdb) n > 6 } > (gdb) n > Cannot access memory at address 0x0 > main () at gdb_test.c:14 > 14 function_in_lib(); > (gdb) s > 0x40015060 in ?? () <---- Cannot step into a function in shared lib! > (gdb) n > Cannot find bounds of current function <---- Problem?? > (gdb) c > Continuing. > > I tried the same using gdb 5.3. This time, I'm still unable to step into > the > shared lib function, but I don't get the errors like "Cannot access memory > at address 0x0" and "Cannot find bounds of current function". In gdb 5.3, > the "step" command is treated as a "next" command for the shared lib > function. > > Similar problems were reported in some archives, but I've not found a > solution that works. > Any help is appreciated. > > Dheeraj > -- > > > > > > > -- View this message in context: http://www.nabble.com/Single-stepping-inside-shared-lib-functions-on-ARM-tf3053566.html#a9769150 Sent from the Gnu - gdb - General mailing list archive at Nabble.com.