Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Ed Peschko <esp5@pge.com>
Cc: gdb@sourceware.org
Subject: Re: tracing, attaching to gdb processes
Date: Thu, 16 Mar 2006 07:04:00 -0000	[thread overview]
Message-ID: <20060316030847.GA31950@nevyn.them.org> (raw)
In-Reply-To: <20060316030013.GA14099@mdssdev05>

On Wed, Mar 15, 2006 at 07:00:13PM -0800, Ed Peschko wrote:
> In any there could be a variable (call it set no_block_read) which toggles
> it so that the user sends input to gdb rather than the underlying program.

You might want to play around with Unix process groups and shared
stdin; it doesn't work quite like you think it does.

I'm sure there's some way to do this, but I don't know how.

> > Feel free:
> > 
> > void gdb_stop (void) { }
> > 
> > (gdb) break gdb_stop
> > 
> > Or put it in a .gdbinit file that you ship with the application.
> 
> Or a hook could be put into gdb which automatically inserts a breakpoint 
> on the function name 'gdb_stop' if it exists.

"break gdb_stop" at the end of your .gdbinit file will do this.

> I mean, think of what happens if gdb_stop is defined in a place which is 
> dynamically loaded? Then the users' setting of the breakpoint will fail.
> Having gdb check upon loading a symbol for the gdb_stop function makes 
> it much easier.
> 
> And even if the functionality for delayed breakpoints is added to gdb, it still
> is forcing the user to reimplement something for each project he/she works
> on..

GDB already has delayed breakpoints (the term used is "pending").  And
it doesn't require any reimplementation if you put it in
$HOME/.gdbinit.

You might want to spend some time with the existing manual.  It's very
complete, and it seems like you don't realize a lot of the things GDB
is already capable of.

You've definitely suggested a couple of things that the manual doesn't
make clear, and I'm saving your messages to add to the manual as
suggestions at some point.

-- 
Daniel Jacobowitz
CodeSourcery


      reply	other threads:[~2006-03-16  3:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-06  5:28 Ed Peschko
2006-03-06 11:55 ` Bob Rossi
2006-03-06 12:01   ` Dave Korn
2006-03-06 20:10     ` Ed Peschko
2006-03-14  2:28 ` Daniel Jacobowitz
2006-03-15  3:44   ` Ed Peschko
2006-03-15  3:45     ` Daniel Jacobowitz
2006-03-15  5:09       ` Ed Peschko
2006-03-15 14:23         ` Daniel Jacobowitz
2006-03-15 23:37           ` Ed Peschko
2006-03-16  0:53             ` Daniel Jacobowitz
2006-03-16  3:08               ` Ed Peschko
2006-03-16  7:04                 ` Daniel Jacobowitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060316030847.GA31950@nevyn.them.org \
    --to=drow@false.org \
    --cc=esp5@pge.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox