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 00:53:00 -0000 [thread overview]
Message-ID: <20060315233739.GA27218@nevyn.them.org> (raw)
In-Reply-To: <20060315231846.GA13847@mdssdev05>
On Wed, Mar 15, 2006 at 03:18:46PM -0800, Ed Peschko wrote:
> On Wed, Mar 15, 2006 at 09:22:31AM -0500, Daniel Jacobowitz wrote:
> > Stopping on input is a bit more complicated than you think. Whenever
> > the program is running, it has control of the terminal - and input goes
> > to it, not to us. I don't see an easy way to do this.
>
> The way to do it is thorugh something similar to ReadKey - For example, the
> following perl script does sort of what I'd want:
No, sorry, you did not understand my explanation of the problem. The
program being run is usually on the same terminal as GDB. If it reads, it
will consume the input.
> Right now, I look inside of the gdb folder inside of the build directory for
> gdb-6.3, and I see that make creates a:
>
> libgdb.a
>
> file. I'm assuming it wouldn't be that difficult to add there.
No; that library is only used in the creation of GDB, it should never
be linked to anything but GDB. It's just a convenience during the
build process. Once upon a time there were experiments with linking
things to GDB directly; eventually we decided that controlling it
through a pipe was a better choice.
> Another thing that might be useful to add there is an 'automatic breakpoint'
> function. Perl has '$DB::single', ie: you set the value $DB::single = 1, the
> debugger automatically stops. Similarly, it would be nice to have a
>
> gdb_stop();
>
> function, which you could use to pepper your code with useful breakpoints.
Feel free:
void gdb_stop (void) { }
(gdb) break gdb_stop
Or put it in a .gdbinit file that you ship with the application.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-03-15 23:37 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 [this message]
2006-03-16 3:08 ` Ed Peschko
2006-03-16 7:04 ` Daniel Jacobowitz
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=20060315233739.GA27218@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