[Libre-soc-sim] Progress

Peter Hsu peter.hsu at bsc.es
Sat Aug 14 18:47:49 BST 2021


Hello Luke, All,

riscv64-...-gdb seems to be working now.  Must compile programs with 
-fno-omit-frame-pointer to make backtrace work:

peterhsu at DELL-LAPTOP:~/TRY$ riscv64-unknown-linux-gnu-gdb cc1
GNU gdb (GDB) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu 
--target=riscv64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
     <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from cc1...
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
_start () at ../sysdeps/riscv/start.S:50
50        call  .Lload_gp
(gdb) b fprintf
Breakpoint 1 at 0x166710: file fprintf.c, line 31.
(gdb) c
Continuing.

Breakpoint 1, __fprintf (stream=0x55a0e3c2dba0, format=0x1bc4a0 "\t%s\t 
\"%s\"\n") at fprintf.c:31
31      va_start (arg, format);
(gdb) s
32      done = __vfprintf_internal (stream, format, arg, 0);
(gdb) s
__vfprintf_internal (s=0x55a0e3c2dba0, format=0x1bc4a0 "\t%s\t 
\"%s\"\n", ap=ap at entry=0x5fffe5f0, mode_flags=mode_flags at entry=0)
     at vfprintf-internal.c:1277
1277      int save_errno = errno;
(gdb) s
1285      ORIENT;
(gdb) s
1289      ARGCHECK (s, format);
(gdb) c
Continuing.

Breakpoint 1, __fprintf (stream=0x55a0e3c2dba0, format=0x1c0b98 "%s\n") 
at fprintf.c:31
31      va_start (arg, format);
(gdb) bt
#0  __fprintf (stream=0x55a0e3c2dba0, format=0x1c0b98 "%s\n") at 
fprintf.c:31
#1  0x0000000000084e08 in data_section () at varasm.c:206
#2  0x0000000000159a98 in output_file_start (file=0x55a0e3c2dba0, 
f_options=0x208fb0 <f_options>, f_len=39,
     W_options=0x209870 <W_options>, W_len=8) at m88k.c:1615
#3  0x0000000000033c5c in compile_file (name=0x5ffffbf5 "cccp.i") at 
toplev.c:2156
#4  0x0000000000036d16 in main (argc=2, argv=0x5fffea38) at toplev.c:3921
(gdb)




More information about the Libre-soc-sim mailing list