From: lm@bitmover.com (Larry McVoy)
Subject: [TUHS] PDP-8 (was: 2.11BSD cross compiler)
Date: Sat, 2 Oct 2010 14:03:46 -0700 [thread overview]
Message-ID: <20101002210346.GE27937@bitmover.com> (raw)
In-Reply-To: <20101002034601.GE66070@dereel.lemis.com>
> > If you could look at the stack frames and give me a stack trace
> > that's more or less the same thing.
>
> (gdb) bt
>
> The real question is not to get a stack trace, but to analyse it.
Hmm, we seem to have a different view. I like people who can write
the gdb bt code, not run it. This isn't an imaginary thing, one of
my guys showed up one day with his own hand rolled backtrace that we
ended up putting in our product for support.
The advantage of his, over the following hack we had before, was that
it worked when no gdb was installed (windows):
void
gdb_backtrace(void)
{
FILE *f;
char *cmd;
unless (getenv("_BK_BACKTRACE")) return;
unless ((f = efopen("BK_TTYPRINTF")) ||
(f = fopen(DEV_TTY, "w"))) {
f = stderr;
}
cmd = aprintf("gdb -batch -ex backtrace '%s/bk' %u 1>&%d 2>&%d",
bin, getpid(), fileno(f), fileno(f));
system(cmd);
free(cmd);
if (f != stderr) fclose(f);
}
--
---
Larry McVoy lm at bitmover.com http://www.bitkeeper.com
next prev parent reply other threads:[~2010-10-02 21:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 5:54 [TUHS] 2.11BSD cross compiler Nick Downing
2010-09-29 0:24 ` Tim Newsham
2010-09-29 0:51 ` Larry McVoy
2010-09-29 2:14 ` John Cowan
2010-09-29 2:38 ` Larry McVoy
2010-09-29 2:59 ` John Cowan
2010-09-29 3:44 ` Larry McVoy
2010-09-30 4:22 ` [TUHS] PDP-8 (was: 2.11BSD cross compiler) Greg 'groggy' Lehey
2010-09-30 4:53 ` John Cowan
2010-09-30 13:50 ` Larry McVoy
2010-10-02 3:46 ` Greg 'groggy' Lehey
2010-10-02 21:03 ` Larry McVoy [this message]
2010-10-02 21:39 ` [TUHS] PDP-8 M. Warner Losh
2010-10-02 10:06 ` [TUHS] PDP-8 (was: 2.11BSD cross compiler) Wolfgang Helbig
2010-09-29 3:14 ` [TUHS] 2.11BSD cross compiler M. Warner Losh
2010-09-29 3:17 ` Steve Nickolas
2010-09-29 3:55 ` Larry McVoy
2010-09-29 4:34 ` [TUHS] 6502 and swtch, was " Warren Toomey
2010-09-29 5:13 ` Steve Nickolas
2010-09-30 17:49 ` Tim Newsham
2010-09-29 20:54 ` [TUHS] " Peter Jeremy
2010-09-29 21:34 ` Larry McVoy
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=20101002210346.GE27937@bitmover.com \
--to=lm@bitmover.com \
/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;
as well as URLs for NNTP newsgroup(s).