This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC] Clarification for source command execution
- From: Muhammad Waqas <mwaqas at codesourcery dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 11 Sep 2013 12:51:27 +0500
- Subject: [RFC] Clarification for source command execution
- Authentication-results: sourceware.org; auth=none
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.