This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] Clarification for source command execution


Hi!

GDB online document says that while source command executing
command in a file and an error in any command terminates
execution of the command file, but in case enable, disable,
enable count, enable once, delete, delete trace and enable delete
doesn't terminates execution.

See the list of commands in cmd file.

$ cat /home/waqas/cmd
enable 1
disable 1
enable once 1
enable count 1 2
enable delete 3
delete 1
delete trace 1
echo should not reach this line\n
commands 1
info thread
end
echo should not reach this line as well\n

Now GDB behavior.

(gdb) source ~/cmd
No breakpoint number 1.
No breakpoint number 1.
No breakpoint number 1.
No breakpoint number 2.
No breakpoint number 3.
No breakpoint number 1.
No breakpoint number 1.
should not reach this line
No breakpoint number 1.
~/cmd:9: Error in sourced command file:
No breakpoints specified.
(gdb)


Execution should stop or not? after 1st line by saying that
No breakpoint number 1
~/cmd:9: Error in source command file:
One or more breakpoint not found.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]