From: Elena Zannoni <ezannoni@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Elena Zannoni <ezannoni@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: RFA: Don't use obsavestring in dwarf2read
Date: Mon, 16 Feb 2004 15:05:00 -0000 [thread overview]
Message-ID: <16432.56112.64946.492536@localhost.redhat.com> (raw)
In-Reply-To: <20040208044115.GD13033@nevyn.them.org>
Daniel Jacobowitz writes:
>
> +/* A note on memory usage: at the present time, this code reads the debug
> + info sections into the objfile's objfile_obstack. A definite improvement
> + for startup time, on platforms which do not emit relocations for debug
> + sections, would be to use mmap instead.
> +
> + In either case, the sections should remain loaded until the objfile is
> + released, and pointers into the section data can be used for any other
> + data associated to the objfile (symbol names, type names, location expressions
> + to name a few). */
> +
There is a similar comment right before the dwarf2_pinfo structure,
can you somehow either unify the two or 'link' them together? Both peices
of information should be available together. Actually having this
comment just before an ifdeffed out section of code, makes me wonder
if it won't be overlooked.
> #if 0
> /* .debug_info header for a compilation unit
> Because of alignment constraints, this structure has padding and cannot
> @@ -2665,8 +2675,7 @@ dwarf2_add_field (struct field_info *fip
> attr = dwarf2_attr (die, DW_AT_name, cu);
> if (attr && DW_STRING (attr))
> fieldname = DW_STRING (attr);
> - fp->name = obsavestring (fieldname, strlen (fieldname),
> - &objfile->objfile_obstack);
> + fp->name = fieldname;
>
Can you please add a clear comment above the assignment about filename being on the obstack?
> /* Change accessibility for artificial fields (e.g. virtual table
> pointer or virtual base class pointer) to private. */
> @@ -2697,11 +2706,9 @@ dwarf2_add_field (struct field_info *fip
> /* Get physical name. */
> physname = dwarf2_linkage_name (die, cu);
>
> - SET_FIELD_PHYSNAME (*fp, obsavestring (physname, strlen (physname),
> - &objfile->objfile_obstack));
> + SET_FIELD_PHYSNAME (*fp, physname ? physname : "");
same here
> FIELD_TYPE (*fp) = die_type (die, cu);
> - FIELD_NAME (*fp) = obsavestring (fieldname, strlen (fieldname),
> - &objfile->objfile_obstack);
> + FIELD_NAME (*fp) = fieldname;
and here
> }
> else if (die->tag == DW_TAG_inheritance)
> {
> @@ -2869,8 +2876,7 @@ dwarf2_add_member_fn (struct field_info
>
> /* Fill in the member function field info. */
> fnp = &new_fnfield->fnfield;
> - fnp->physname = obsavestring (physname, strlen (physname),
> - &objfile->objfile_obstack);
> + fnp->physname = physname ? physname : "";
and here .... and everywhere else?
otherwise ok.
next prev parent reply other threads:[~2004-02-16 15:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-12 1:57 Daniel Jacobowitz
2004-02-02 18:22 ` Daniel Jacobowitz
2004-02-05 19:29 ` Elena Zannoni
2004-02-05 19:48 ` Daniel Jacobowitz
2004-02-05 20:37 ` Elena Zannoni
2004-02-05 20:47 ` Daniel Jacobowitz
2004-02-05 23:20 ` Elena Zannoni
2004-02-08 4:41 ` Daniel Jacobowitz
2004-02-16 15:05 ` Elena Zannoni [this message]
2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-05 3:31 ` Daniel Jacobowitz
2004-01-15 14:23 Michael Elizabeth Chastain
2004-02-02 21:48 Michael Elizabeth Chastain
2004-02-10 10:08 Michael Elizabeth Chastain
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=16432.56112.64946.492536@localhost.redhat.com \
--to=ezannoni@redhat.com \
--cc=drow@mvista.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