This is the mail archive of the gdb-prs@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]

[Bug mi/19417] New: History expansion cannot be enabled


https://sourceware.org/bugzilla/show_bug.cgi?id=19417

            Bug ID: 19417
           Summary: History expansion cannot be enabled
           Product: gdb
           Version: 7.7
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mi
          Assignee: unassigned at sourceware dot org
          Reporter: agupta at tifr dot res.in
  Target Milestone: ---

I have enabled history expansion with mi interface by writing the following
content in ~/.gdbinit

set history save
set history expansion on
set history filename ~/.gdb_history

When I run gdb with mi then I get the following error. History expansion is not
enabled. Notice !r is not treated as history expansion but but a shell command
"r".

$ gdb -i=mi
=thread-group-added,id="i1"
~"GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1\n"
~"Copyright (C) 2014 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to
change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by
law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-linux-gnu\".\nType \"show configuration\"
for configuration details."
~"\nFor bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>.\n"
~"Find the GDB manual and other documentation resources online
at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
~"For help, type \"help\".\n"
~"Type \"apropos word\" to search for commands related to \"word\".\n"
=cmd-param-changed,param="history save",value="on"
=cmd-param-changed,param="history expansion",value="on"
=cmd-param-changed,param="history filename",value="/home/agupta/.gdb_history"
(gdb) 
r
&"r\n"
~"Starting program:  \n"
&"No executable file specified.\n"
&"Use the \"file\" or \"exec-file\" command.\n"
^error,msg="No executable file specified.\nUse the \"file\" or \"exec-file\"
command."
(gdb) 
!r
&"!r\n"
bash: r: command not found
^done
(gdb) 



gdb without mi does not show this problem! 

$ gdb
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 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 "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) r
Starting program:  
No executable file specified.
Use the "file" or "exec-file" command.
(gdb) !r
r
Starting program:  
No executable file specified.
Use the "file" or "exec-file" command.
(gdb)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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