From 49eefec4f5d470ae3538bded9ca758cf178bb7aa Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Fri, 5 Apr 2024 22:43:06 +0200 Subject: gdb: add history, schedule multiple, .. --- src/tools/gdb.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/tools/gdb.md b/src/tools/gdb.md index 17d335c..41d26f7 100644 --- a/src/tools/gdb.md +++ b/src/tools/gdb.md @@ -13,12 +13,16 @@ --tty set I/O tty for debugee --batch run in batch mode, exit after processing options (eg used for scripting) + --batch-silent link --batch, but surpress gdb stdout ``` # Interactive usage ## Misc ```markdown + apropos + Search commands matching regex. + tty Set as tty for debugee. Make sure nobody reads from target tty, easiest is to spawn a shell @@ -38,6 +42,9 @@ info display List display expressions. + + info sharedlibrary [] + List shared libraries loaded. Optionally use to filter. ``` ## Breakpoints @@ -184,6 +191,14 @@ thread name Switch to inferior with . ``` +## Scheduling +```markdown + set schedule-multiple + on: Resume all threads of all processes (inferiors) when continuing + or stepping. + off: (default) Resume only threads of current process (inferior). +``` + ## Shell commands ```markdown shell @@ -235,13 +250,19 @@ thread name set logging file Change output log file to - set logging redirect + set logging redirect on: only log to file. off: log to file and tty. - set logging overwrite + set logging overwrite on: Truncate log file on each run. off: Append to logfile (default). + + set history filename + Change file where to save and restore command history to and from. + + set history + Enable or disable saving of command history. ``` > Logging options should be configured before logging is turned on. -- cgit v1.2.3