DEBUG WITH GDB ERROR ! - spike: unrecognized option --gdb-port
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
DEBUG WITH GDB ERROR ! - spike: unrecognized option --gdb-port
Hello,
I've installed and built the riscv toolchain and i'm following these insructions:
Running spike --gdb-port 9824 pk tests/debug or spike --gdb-port 9824 pk debug/tests in the first terminal gives the following error:
Code:
spike: unrecognized option --gdb-port
usage: spike [host options] <target program> [target options]
Host Options:
-p <n> Simulate <n> processors
-m <n> Provide <n> MB of target memory
-d Interactive debug mode
-g Track histogram of PCs
-h Print this help message
--ic=<S>:<W>:<B> Instantiate a cache model with S sets,
--dc=<S>:<W>:<B> W ways, and B-byte blocks (with S and
--l2=<S>:<W>:<B> B both powers of 2).
--extension=<name> Specify RoCC Extension
--extlib=<name> Shared library to load
Could you please tell me if i'm missing some element that i haven't installed or is the command i'm running wrong ?
Doesn't appear that you've compiled the exact source provided in that GitHub example. In spike_main/spike.cc shows as:
Code:
static void help()
{
fprintf(stderr, "usage: spike [host options] <target program> [target options]\n");
fprintf(stderr, "Host Options:\n");
fprintf(stderr, " -p<n> Simulate <n> processors [default 1]\n");
fprintf(stderr, " -m<n> Provide <n> MiB of target memory [default 4096]\n");
fprintf(stderr, " -d Interactive debug mode\n");
fprintf(stderr, " -g Track histogram of PCs\n");
fprintf(stderr, " -l Generate a log of execution\n");
fprintf(stderr, " -h Print this help message\n");
fprintf(stderr, " -H Start halted, allowing a debugger to connect\n");
fprintf(stderr, " --isa=<name> RISC-V ISA string [default %s]\n", DEFAULT_ISA);
fprintf(stderr, " --ic=<S>:<W>:<B> Instantiate a cache model with S sets,\n");
fprintf(stderr, " --dc=<S>:<W>:<B> W ways, and B-byte blocks (with S and\n");
fprintf(stderr, " --l2=<S>:<W>:<B> B both powers of 2).\n");
fprintf(stderr, " --extension=<name> Specify RoCC Extension\n");
fprintf(stderr, " --extlib=<name> Shared library to load\n");
fprintf(stderr, " --gdb-port=<port> Listen on <port> for gdb to connect\n");
fprintf(stderr, " --dump-config-string Print platform configuration string and exit\n");
exit(1);
}
Your option list shows differently, and not just cut off, but different where there is missing the capital -H, the --isa term, and then the --gdb-port as well as the --dump-config options are not at the end of your output.
Have you modified the original code provided in that Git repository?
That posting is dated 2011, but it may be worth attempting to contact the poster of it to see if they can provide more details about this problem; however my read is that you've cut out some code from their original offering and thus that error is not just within the help output, but also in the argument parsing for the main program.
Yes, in fact the spike.cc was different from the one on Github. I'm sorry if this sounds silly (newbie) but i've replaced the code in my spike.cc with the newer one. Does that mean i have to build everything ? or just configure riscv-isa-sim (/.configure) ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.