Berkeley CSUA MOTD:Entry 36795
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/24 [General] UID:1000 Activity:popular
5/24    

2005/3/21-24 [Computer/SW/Compilers] UID:36795 Activity:nil
3/21    Is there a "skip" command in GDB?  I want to see what happens when
        I don't execute a certain command in a certain case.
        \_ I don't know of any, but you could do this:
           if (variable==1) { your command; };
           then use the set command to change the variable at your whim. --PM
        \_ If by "command" you mean "instruction in the program being debugged",
           you can use the "jump" command -- it sets the PC to a value you
           specify. -gm
           \_ I think it is clear he means a gdb command that will allow him
              to skip certain lines in the program, i.e. a pretend step.
        \_ There are hairy ways to do this ... if to break copy protection ...
           but there is no simple "skip" instruction in gdb.
        \_ jump?