Bug 813068 - gdb finish inside commands list quit program
Summary: gdb finish inside commands list quit program
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-16 19:49 UTC by Jérôme Glisse
Modified: 2012-04-16 19:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-16 19:58:45 UTC
Type: Bug


Attachments (Terms of Use)

Description Jérôme Glisse 2012-04-16 19:49:20 UTC
If executing the following gdb script, gdb quit the program on the finish command while i expect it should finish the current function

file ls
set $myvar = 1
break indent
set $myvar = 0
finish
set $myvar = 1
continue
end
r

Version-Release number of selected component (if applicable):
Tested on f16 & f17

Comment 1 Jan Kratochvil 2012-04-16 19:58:45 UTC
Assuming you should have put "commands" after "break".

Finish does not work in command lists, it should work as:

file ls
set $myvar = 1
break indent
commands
  set $myvar = 0
  up
  tbreak
  commands
    set $myvar = 1
    continue
  end
  continue
end
r

Untested, maybe also some "silent" should be there as it will be talkative this way.

The problem is GDB commands get executed on a single stop, "finish" resumes execution, execution resume can be always only the last command of a sequence.


Note You need to log in before you can comment on or make changes to this bug.