0

I run make qemu-gdb to prepare xv6 for debugging and then in another terminal with opened in the same directory (in xv6 dir) I enter ```gdb`` and I get this output:gdb

just for more info, seems like it connects to debugging process automatically and when I enter target remote TCP::26000 it wants to end this process.

now my actual problem is here when I enter something like b cat.c:12 it says that source file cat.c doesn't exist (which I'm sure is not true and happens for every file I enter instead of cat.c); although I can put breakpoint for some functions such as fork or exec.

I don't know where the problem is. could you help me to fix this?

pouya
  • 71
  • 8
  • Does this answer your question? [Debugging user-code on xv6 with gdb](https://stackoverflow.com/questions/10534798/debugging-user-code-on-xv6-with-gdb) – Mark Plotnick Oct 16 '22 at 10:28
  • no, after entering `file cat`, I'm still unable to set `b cat.c:12` – pouya Oct 16 '22 at 13:13

1 Answers1

-1

actually, I found a solution but that's not what was on my mind. We can use symbol-file _<program name> which in my case, it's symbol-file _cat and now we are able to set a breakpoint like break cat.c:12.

but I wanted gdb to load all of the symbol files by itself.

pouya
  • 71
  • 8