Because I’m so new, and still learning, I want to give an update and seek further assistance.
First, I finally realized Openwrt was using sstrip on the final binaries… I’ve turned that off.
Second, now that it says it’s reading the symbols ok, I tried again:
grommish@norwits:~/openwrt$ ./scripts/remote-gdb 192.168.1.1:9000 build_dir/target-mips64_octeon3_64_musl/suricata-6.0.0-beta1/ipkg-mips64_octeon3/suricata6/usr/bin/suricata
Using target mips64_octeon3_64 (musl, )
GNU gdb (GDB) 8.3.1
Copyright (C) 2019 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=mips64-openwrt-linux-musl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://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 build_dir/target-mips64_octeon3_64_musl/suricata-6.0.0-beta1/ipkg-mips64_octeon3/suricata6/usr/bin/suricata...
warning: Unsupported auto-load script at offset 0 in section .debug_gdb_scripts
of file /home/grommish/openwrt/build_dir/target-mips64_octeon3_64_musl/suricata-6.0.0-beta1/ipkg-mips64_octeon3/suricata6/usr/bin/suricata.
Use `info auto-load python-scripts [REGEXP]' to list them.
0x000000fff7f43a00 in _dlstart ()
from /home/grommish/openwrt/scripts/../staging_dir/target-mips64_octeon3_64_musl/root-octeon/lib/ld-musl-mips64-sf.so.1
(gdb) set remote exec-file /usr/bin/suricata
(gdb) set args -c /etc/suricata/suricata.yaml -i eth0
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/grommish/openwrt/build_dir/target-mips64_octeon3_64_musl/suricata-6.0.0-beta1/ipkg-mips64_octeon3/suricata6/usr/bin/suricata -c /etc/suricata/suricata.yaml -i eth0
Program received signal SIGILL, Illegal instruction.
`0x0000000120eab7fc` in decfloat (f=0xffffffd7c0, c=49, bits=53, emin=-1074, sign=1, pok=1) at src/internal/floatscan.c:67
67 src/internal/floatscan.c: No such file or directory.
(gdb) x/i
Argument required (starting display address).
(gdb) x/i 0x0000000120eab7fc
=> 0x120eab7fc <decfloat+60>: sdc1 $f24,8376(sp)
(gdb)
The 0x0000000120eab7fc
seems to be the space that it dies at, and when i do the x/i
on it, it returns the sdc1
If i x/i
on the FILE f*
pointer (0xffffffd7c0
), I get:
(gdb) x/i 0xffffffd7c0
0xffffffd7c0: dsra32 zero,zero,0x3
(gdb)
Which shows as:
DSRA32 Doubleword Shift Right Arithmetic Plus 32
Again, i apologize to all because I am seriously learning as I go and trying to get those with the knowledge information that can be useful.