LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-08-2008, 04:07 AM   #1
jackandking
Member
 
Registered: Dec 2004
Posts: 92

Rep: Reputation: 15
Question [gdb]how to exec cmd when breakpoint was hit


suppose I have two breakpoint b1 and b2,
and I deinfed scripts s1 and s2 to exec at break time.

how to make s1 autorun when b1 was hit?
 
Old 12-08-2008, 11:49 PM   #2
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by jackandking View Post
suppose I have two breakpoint b1 and b2,
and I deinfed scripts s1 and s2 to exec at break time.

how to make s1 autorun when b1 was hit?
Code:
break b1
   commands
      silent # optional. should be first if present
      # whatever command you like include running everything via
      # gdb's shell command
      continue # optional, if you want execution continue after command execution
   ends
By the way, what ary trying to achieve ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
howto exec a cmd after certain time of inactivity? minike Slackware 6 02-06-2007 06:01 AM
exec cmd=perl... work but exec cgi doenst crions Slackware 5 12-09-2005 12:17 PM
gdb breakpoint doesnt work? Thinking Programming 3 09-29-2005 06:36 AM
Cmd that shows which config files are for target exec? oasisbhrnw99 Linux - General 2 09-05-2005 10:58 PM
gas and gdb - breakpoint not "breaking" prell Programming 3 07-30-2004 06:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration