diff options
author | Freya Murphy <freya@freyacat.org> | 2025-04-22 11:21:14 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-04-22 11:21:14 -0400 |
commit | db9f2fe83e21e1cd917b65847bd30ab690b0b464 (patch) | |
tree | 0b19cad7d13300d45ffce0b3fb6fce362dc4607e /config | |
parent | fix kernel fs invalid err offset bug (diff) | |
download | comus-db9f2fe83e21e1cd917b65847bd30ab690b0b464.tar.gz comus-db9f2fe83e21e1cd917b65847bd30ab690b0b464.tar.bz2 comus-db9f2fe83e21e1cd917b65847bd30ab690b0b464.zip |
update gdb config
Diffstat (limited to 'config')
-rw-r--r-- | config/gdbinit | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/config/gdbinit b/config/gdbinit index ca2c885..a5266e5 100644 --- a/config/gdbinit +++ b/config/gdbinit @@ -1,31 +1,3 @@ -# adapted from the xv6 .gdbinit.tmpl file -set $lastcs = -1 - -define hook-stop - # There doesn't seem to be a good way to detect if we're in 16- or - # 32-bit mode, but we always run with CS == 8 in 32-bit mode. - if $cs == 8 || $cs == 27 - if $lastcs != 8 && $lastcs != 27 - set architecture i386 - end - x/i $pc - else - if $lastcs == -1 || $lastcs == 8 || $lastcs == 27 - set architecture i8086 - end - # Translate the segment:offset into a physical address - printf "[%4x:%4x] ", $cs, $eip - x/i $cs*16+$eip - end - set $lastcs = $cs -end - -echo + target remote localhost:1337\n +set architecture i386:x86-64 target remote localhost:1337 - -# If this fails, it's probably because your GDB doesn't support ELF. -# Look at the tools page at -# http://pdos.csail.mit.edu/6.828/2009/tools.html -# for instructions on building GDB with ELF support. -echo + symbol-file build/kernel/kernel\n -symbol-file build/kernel/kernel +symbol-file bin/kernel.bin |