flâneur — a map of the web's best reading

CS111 Assignment 3 FAQ

web.stanford.edu · 1,443 words · saved by 1 readers

Then you can set breakpoints and run it with run, at which point you'll see your shell prompt and can enter commands. You can also do run < SCRIPTFILE, specifying a script file, and it will read input from there instead. Debugging with multiple processes requires some additional steps because GDB isn't always sure whether you want to step through the parent process or a child process's execution. Make sure to enter the following 2 commands right when you start GDB: The first tells GDB to capture any fork-ed processes and pause them on fork. The second says, when a child process is forked, to switch to tracing that child process. You can list all processes GDB has captured like this: And switch to a different one by specifying its number, like this: You can stop watching a process and continue it by specifying its number, like this: Click here for sample GDB run. An easy way to step through the execution for a particular process is to put a breakpoint in code that only that process will

CS111 Assignment 3 FAQ Assignment 3 FAQ --> How do I use GDB for debugging on this assignment? You can run your shell under GDB like this: gdb stsh Then you can set breakpoints and run it with run , at which point you'll see your shell prompt and can enter commands. You can also do run < SCRIPTFILE , specifying a script file, and it will read input from there instead. Debugging with multiple processes requires some additional steps because GDB isn't always sure whether you want to step through the parent process or a child process's execution. Make sure to enter the following 2 commands right

Explore this link on the map →

related reading