Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Martin M. Hunt" <hunt@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA] regcache fix
Date: Tue, 19 Mar 2002 18:29:00 -0000	[thread overview]
Message-ID: <200203200228.g2K2Sri16880@localhost.localdomain> (raw)

Currently build_regcache is called 3 times, once at initialization, 
before any architectures are registered, once when the host is 
registered and once when the target is registered.  I don't see 
any reason for the first call, and in some non-multiarched 
targets it can cause core dumps.  
-- 
Martin Hunt
GDB Engineer
Red Hat, Inc.

2002-03-19  Martin M. Hunt  <hunt@redhat.com>

	* regcache.c (_initialize_regcache): No need to call
	build_regcache() at this time; it gets called whenever
	the gdbarch changes.

Index: regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/regcache.c,v
retrieving revision 1.32
diff -u -u -r1.32 regcache.c
--- regcache.c	2002/02/06 03:16:38	1.32
+++ regcache.c	2002/03/20 02:24:33
@@ -802,8 +802,6 @@
 void
 _initialize_regcache (void)
 {
-  build_regcache ();
-
   register_gdbarch_swap (&registers, sizeof (registers), NULL);
   register_gdbarch_swap (&register_valid, sizeof (register_valid), NULL);
   register_gdbarch_swap (NULL, 0, build_regcache);


             reply	other threads:[~2002-03-20  2:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-19 18:29 Martin M. Hunt [this message]
2002-03-20 12:41 ` Andrew Cagney
2002-03-20 18:16   ` Martin M. Hunt

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=200203200228.g2K2Sri16880@localhost.localdomain \
    --to=hunt@redhat.com \
    --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