From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [RFA] Remove some cleanups from dwarf2read.c
Date: Mon, 09 Oct 2017 02:36:00 -0000 [thread overview]
Message-ID: <65d89acd-8c12-e317-bef7-7cdbfe03a099@simark.ca> (raw)
In-Reply-To: <20171008225305.22006-1-tom@tromey.com>
On 2017-10-08 06:53 PM, Tom Tromey wrote:
> @@ -9068,18 +9047,15 @@ dwarf2_physname (const char *name, struct die_info *die, struct dwarf2_cu *cu)
> /* This is a lie, but we already lie to the caller new_symbol_full.
> new_symbol_full assumes we return the mangled name.
> This just undoes that lie until things are cleaned up. */
> - demangled = NULL;
> }
> else
> {
> - demangled = gdb_demangle (mangled,
> - (DMGL_PARAMS | DMGL_ANSI | DMGL_RET_DROP));
> + demangled.reset (gdb_demangle (mangled,
> + (DMGL_PARAMS | DMGL_ANSI
> + | DMGL_RET_DROP)));
It would be nice (as a future change) for gdb_demangle to return a unique_xmalloc_ptr.
> @@ -11371,21 +11336,17 @@ lookup_dwo_cutu (struct dwarf2_per_cu_data *this_unit,
> {
> /* Print the name of the DWP file if we looked there, helps the user
> better diagnose the problem. */
> - char *dwp_text = NULL;
> - struct cleanup *cleanups;
> + std::string dwp_text;
>
> if (dwp_file != NULL)
> - dwp_text = xstrprintf (" [in DWP file %s]", lbasename (dwp_file->name));
> - cleanups = make_cleanup (xfree, dwp_text);
> + dwp_text = string_printf (" [in DWP file %s]", lbasename (dwp_file->name));
80 columns.
Otherwise, LGTM.
Simon
prev parent reply other threads:[~2017-10-09 2:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-08 22:53 Tom Tromey
2017-10-09 2:36 ` Simon Marchi [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=65d89acd-8c12-e317-bef7-7cdbfe03a099@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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