Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew STUBBS <andrew.stubbs@st.com>
To: Jim Blandy <jimb@red-bean.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] fix symbol-file crash
Date: Fri, 02 Dec 2005 11:48:00 -0000	[thread overview]
Message-ID: <43902CD9.5090007@st.com> (raw)
In-Reply-To: <8f2776cb0512011713h6afa848ag9f0fd9dfbca0efcc@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 296 bytes --]

Jim Blandy wrote:
> I think this is obvious; please go ahead and commit it.
> 
> However, instead of using <unknown> when symfile_objfile is NULL, just
> use two distinct prompt strings: "Discard symbol table from `%s'? "
> and "Discard symbol table? ".

Thanks I committed the attached.

Andrew

[-- Attachment #2: symbol-file.patch --]
[-- Type: text/plain, Size: 817 bytes --]

2005-12-02  Andrew Stubbs  <andrew.stubbs@st.com>

	* symfile.c (symbol_file_clear): Test symfile_objfile is not NULL
	before dereferencing it.
	Gettextize the query.

Index: src/gdb/symfile.c
===================================================================
--- src.orig/gdb/symfile.c	2005-12-01 17:35:14.000000000 +0000
+++ src/gdb/symfile.c	2005-12-02 10:49:45.000000000 +0000
@@ -1085,8 +1085,10 @@ symbol_file_clear (int from_tty)
 {
   if ((have_full_symbols () || have_partial_symbols ())
       && from_tty
-      && !query ("Discard symbol table from `%s'? ",
-		 symfile_objfile->name))
+      && (symfile_objfile
+	  ? !query (_("Discard symbol table from `%s'? "),
+		    symfile_objfile->name)
+	  : !query (_("Discard symbol table? "))))
     error (_("Not confirmed."));
     free_all_objfiles ();
 

      reply	other threads:[~2005-12-02 11:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-01 18:04 Andrew STUBBS
2005-12-02  1:17 ` Jim Blandy
2005-12-02 11:48   ` Andrew STUBBS [this message]

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=43902CD9.5090007@st.com \
    --to=andrew.stubbs@st.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jimb@red-bean.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