From: Marc Khouzam <marc.khouzam@ericsson.com>
To: Tom Tromey <tromey@redhat.com>
Cc: "'Joel Brobecker'" <brobecker@adacore.com>,
"'gdb-patches@sourceware.org'"
<gdb-patches@sourceware.org>
Subject: RE: [Python] Segfault when clearing pspace
Date: Sat, 18 Dec 2010 02:13:00 -0000 [thread overview]
Message-ID: <F7CE05678329534C957159168FA70DEC572E0C0E2F@EUSAACMS0703.eamcs.ericsson.se> (raw)
In-Reply-To: <m3mxo5if3s.fsf@fleche.redhat.com>
From: gdb-patches-owner@sourceware.org [gdb-patches-owner@sourceware.org] On Behalf Of Tom Tromey [tromey@redhat.com]
>>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:
Marc> The existing FIXME comment about how to get the arch seems to
Marc> confirm that something should be fixed there.
Marc> Below the patch is a session that shows how to reproduce
Marc> the crash.
Marc> What do you think?
> Please remove the FIXME comment.
> This is ok with that change plus a ChangeLog entry.
I committed the following to HEAD and 7_2.
Thanks Tom!
Marc
2010-12-17 Marc Khouzam <marc.khouzam@ericsson.com>
* python/py-progspace.c (py_free_pspace): Obtain arch another
way to avoid dereferencing a null pointer.
### Eclipse Workspace Patch 1.0
#P src
Index: gdb/python/py-progspace.c
===================================================================
RCS file: /cvs/src/src/gdb/python/py-progspace.c,v
retrieving revision 1.3
diff -u -r1.3 py-progspace.c
--- gdb/python/py-progspace.c 17 May 2010 21:23:25 -0000 1.3
+++ gdb/python/py-progspace.c 18 Dec 2010 01:26:51 -0000
@@ -23,6 +23,7 @@
#include "progspace.h"
#include "objfiles.h"
#include "language.h"
+#include "arch-utils.h"
typedef struct
{
@@ -134,9 +135,7 @@
{
struct cleanup *cleanup;
pspace_object *object = datum;
- /* FIXME: What's the right way to get a program space's arch?
- There may be multiple. */
- struct gdbarch *arch = get_objfile_arch (pspace->symfile_object_file);
+ struct gdbarch *arch = get_current_arch ();
cleanup = ensure_python_env (arch, current_language);
object->pspace = NULL;
next prev parent reply other threads:[~2010-12-18 2:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-04 19:11 Assertion failure because of missing inferior Marc Khouzam
2010-12-07 18:54 ` Tom Tromey
2010-12-08 1:38 ` Marc Khouzam
2010-12-10 19:59 ` Tom Tromey
2010-12-10 20:21 ` Marc Khouzam
2010-12-10 21:01 ` Marc Khouzam
2010-12-10 21:38 ` Marc Khouzam
2010-12-14 14:50 ` Tom Tromey
2010-12-14 15:04 ` Joel Brobecker
2010-12-14 15:31 ` Pedro Alves
2010-12-15 5:12 ` Joel Brobecker
2010-12-14 20:00 ` Marc Khouzam
2010-12-15 15:57 ` [Python] Segfault when clearing pspace (was: RE: Assertion failure because of missing inferior) Marc Khouzam
2010-12-16 21:26 ` [Python] Segfault when clearing pspace Tom Tromey
2010-12-18 2:13 ` Marc Khouzam [this message]
2010-12-18 2:19 ` Assertion failure because of missing inferior Marc Khouzam
2010-12-14 14:49 ` Tom Tromey
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=F7CE05678329534C957159168FA70DEC572E0C0E2F@EUSAACMS0703.eamcs.ericsson.se \
--to=marc.khouzam@ericsson.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@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