Commit Graph

9 Commits

Author SHA1 Message Date
Justin C. Miller
2dd78beb92 [tools] Add j6threads gdb command
The j6threads command shows the current thread, ready threads, and
blocked threads for a given CPU.

To support this, TCB structs gained a pointer to their thread (instead
of trying to do offset magic) and threads gained a pointer to their
creator. Also removed thread::from_tcb() now that the TCB has a pointer.
2022-01-15 17:45:12 -08:00
Justin C. Miller
5c82e5ba1b [tools] Fix gdb j6bt & j6stack commands
These commands had a number of issues. They weren't evaluating their
arguments (eg, you couldn't use a symbol name instead of a number), and
they weren't explicitly using hex when evaluating numbers, so they were
getting incorrect values when the default radix was not 10.
2022-01-15 09:07:00 -08:00
Justin C. Miller
348b64ebb0 [tools] Fix the j6tw GDB command
The j6tw (j6 table walk) command to debug page tables was throwing an
exception for an integer that was too big when the default radix was 16,
because it would interpret ints as hex even without the 0x prefix. Now
j6tw explicitly converts to hex and uses the prefix to be explicit.
2021-12-31 20:30:42 -08:00
Justin C. Miller
59d7271fb5 [scripts] Improve gdb script stack handling
When setting a radix other than 10, the j6stack command will start
adding the wrong values - make sure to specify a radix for the offset
explicitly.

Also show the frame pointer for each frame with the j6bt command, and
don't throw exceptions if the name of the block is unknown.
2021-08-01 14:25:57 -07:00
Justin C. Miller
5e7792c11f [scripts] Add GDB j6tw page table walker
Added the command "j6tw <pml4> <addr>" which takes any arguments that
evaluate to addresses or integers. It displays the full breakdown of the
page table walk for the given address, with flags.
2021-02-07 23:50:53 -08:00
8bb78c95a8 [tools] Improve j6stack GDB command
Improve the j6stack command in two ways: first, swap the order of the
arguments, as depth is much more likely to be changed. Second, on any
exception accessing memory in the stack, print the exception and
continue instead of failing the whole command.
2021-01-18 13:48:11 -08:00
ca7f78565d [tools] Add the j6bt command to gdb functions
Added the command j6bt (and renamed popc_stack to j6stack) to make
tracking kernel callstacks across interrupts easier.
2020-09-16 23:58:28 -07:00
Justin C. Miller
cc9cde9bfe [tooling] Remove old GDB workarounds
GDB works far better now with QEMU's `-S` flag. No longer does it
complain about changing the target from 32 to 64 bits. Get rid of the
old `waiting` loop and `sleep` call in the GDB config for the kernel.

Tags: debugging
2020-05-24 19:50:45 -07:00
Justin C. Miller
6285517ef7 Rename Popcorn to jsix.
See README.md for more information.
2019-05-27 14:07:29 -07:00