From: Mark Kettenis <kettenis@chello.nl>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Add StackGhost support to corelow.c
Date: Wed, 07 Apr 2004 00:19:00 -0000 [thread overview]
Message-ID: <200404070019.i370JLNa065626@elgar.kettenis.dyndns.org> (raw)
This adds support for StackGhost cookies in core files. Will check
this in in a few days.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* corelow.c (core_xfer_partial): Add support for
TARGET_OBJECT_WCOOKIE.
Index: corelow.c
===================================================================
RCS file: /cvs/src/src/gdb/corelow.c,v
retrieving revision 1.36
diff -u -p -r1.36 corelow.c
--- corelow.c 28 Feb 2004 18:04:36 -0000 1.36
+++ corelow.c 7 Apr 2004 00:17:54 -0000
@@ -564,6 +564,38 @@ core_xfer_partial (struct target_ops *op
}
return -1;
+ case TARGET_OBJECT_WCOOKIE:
+ if (readbuf)
+ {
+ /* When the aux vector is stored in core file, BFD
+ represents this with a fake section called ".wcookie". */
+
+ struct bfd_section *section;
+ bfd_size_type size;
+ char *contents;
+
+ section = bfd_get_section_by_name (core_bfd, ".wcookie");
+ if (section == NULL)
+ return -1;
+
+ size = bfd_section_size (core_bfd, section);
+ if (offset >= size)
+ return 0;
+ size -= offset;
+ if (size > len)
+ size = len;
+ if (size > 0 &&
+ ! bfd_get_section_contents (core_bfd, section, readbuf,
+ (file_ptr) offset, size))
+ {
+ warning ("Couldn't read StackGhost cookie in core file.");
+ return -1;
+ }
+
+ return size;
+ }
+ return -1;
+
default:
if (ops->beneath != NULL)
return ops->beneath->to_xfer_partial (ops->beneath, object, annex,
next reply other threads:[~2004-04-07 0:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-07 0:19 Mark Kettenis [this message]
2004-04-10 9:49 ` Mark Kettenis
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=200404070019.i370JLNa065626@elgar.kettenis.dyndns.org \
--to=kettenis@chello.nl \
--cc=gdb-patches@sources.redhat.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