Bug 15511 - source prints confusing output when processing nested source includes.
Summary: source prints confusing output when processing nested source includes.
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 8.3
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-21 16:40 UTC by Luis Machado
Modified: 2023-12-31 16:22 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luis Machado 2013-05-21 16:40:42 UTC
Consider two files:

foo.inc
--
source bar.inc
--

bar.inc
--
INVALIDCOMMAND
--

Run the following: ./gdb -ex "source foo.inc"

GNU gdb (GDB) 7.6.50.20130520-cvs
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=arm-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
foo.inc:1: Error in sourced command file:
COMMAND:1: Error in sourced command file:
Undefined command: "INVALIDCOMMAND".  Try "help".
(gdb) 

The expected output should be the following:

foo.inc:1: Error in sourced command file:
bar.inc:1: Error in sourced command file: