From: Ed Swarthout <ed.swarthout@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: emacs-buffer.gdb
Date: Thu, 9 Jun 2005 21:17:48 -0500 [thread overview]
Message-ID: <fda11fc7050609191754f0db0b@mail.gmail.com> (raw)
In-Reply-To: <jell5j3ngy.fsf@sykes.suse.de>
On 6/9/05, Andreas Schwab <schwab@suse.de> wrote:
> > - set $filename = ' '
> > + set $filename = " "
>
> This is dangerous because gdb needs to call malloc in the inferior in
> order to allocate the string.
Thank you. In fact, had I tested it with a core file, I'd have gotten:
"You can't do that without a process to debug."
Here's a better fix.
-Ed Swarthout
--- emacs-buffer.gdb 30 May 2005 17:01:09 -0000 1.3
+++ emacs-buffer.gdb 10 Jun 2005 02:05:38 -0000
@@ -117,12 +117,13 @@
if $buf->filename != Qnil
ygetptr $buf->filename
set $filename = ((struct Lisp_String *) $ptr)->data
+ printf "%2d %c %9d %-20s %-10s %s\n", \
+ $i, $modp, ($buf->text->z_byte - 1), $name, $mode, $filename
else
- set $filename = ' '
+ printf "%2d %c %9d %-20s %-10ss\n", \
+ $i, $modp, ($buf->text->z_byte - 1), $name, $mode
end
- printf "%2d %c %9d %-20s %-10s %s\n", \
- $i, $modp, ($buf->text->z_byte - 1), $name, $mode, $filename
end
set $i++
next prev parent reply other threads:[~2005-06-10 2:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-09 4:15 emacs-buffer.gdb Ed Swarthout
2005-06-09 9:10 ` emacs-buffer.gdb Andreas Schwab
2005-06-10 2:17 ` Ed Swarthout [this message]
2005-06-10 20:48 ` emacs-buffer.gdb Juri Linkov
2005-06-10 22:44 ` emacs-buffer.gdb Noah Friedman
2005-06-11 13:03 ` emacs-buffer.gdb Eli Zaretskii
2005-06-11 23:38 ` emacs-buffer.gdb Kim F. Storm
-- strict thread matches above, loose matches on Subject: below --
2005-05-02 5:20 emacs-buffer.gdb Noah Friedman
2005-05-03 17:12 ` emacs-buffer.gdb Richard Stallman
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fda11fc7050609191754f0db0b@mail.gmail.com \
--to=ed.swarthout@gmail.com \
--cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).