From: Michal Ludvig <mludvig@suse.cz>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: Andrew Cagney <ac131313@cygnus.com>,
GDB Patches <gdb-patches@sources.redhat.com>
Subject: Re: [RFA] dwarf2cfi.c improvements
Date: Tue, 11 Jun 2002 08:28:00 -0000 [thread overview]
Message-ID: <3D06171B.3040709@suse.cz> (raw)
In-Reply-To: <15621.27804.562409.937859@localhost.redhat.com>
Elena Zannoni wrote:
> Michal Ludvig writes:
> >
> > Well, this is the patch without unrelated message changes. Can I commit
> > it? It seems to be quite stable in our everyday use...
> >
>
> Michal, sorry, not as is.
No problem, I'll rework it.
> There are coding standard violations having to do with spaces before
> '(' and after ')' in casts. Also, it is better to not have multiple
> initializations in a single line, like this:
> > ! char *start = NULL, *end = NULL, *frame_buffer = NULL;
Changed. I've reindented the whole file. I hope running 'indent
dwarf2cfi.c' is enough.
> Conditional expressions are also flagged by the ARI.
What does 'AR Index' mean and how do I run the checker?
> Can I suggest that you split the pcrel changes into a separate patch?
Well, I wouldn't like to. When you start parsing .eh_frame you need a
working pcrel, otherwise it is useless. But without parsing .eh_frame
you can't verify whether it works, because .debug_frame doesn't use
relative addressing. May I ask you to approve both at once, please?
> About pcrel, I don't like the use of the flag like you have below.
> Could you find some other way to do it w/o passing the address of the
> flag around? Could you maybe change the function to return 0/1 and
> have the current return value as an out parameter instead?
That is possible, but it would make read_encoded_pointer() behave
differently from read_pointer(). I'll better introduce a new function
like pointer_type() that would return an enum of possible types.
> Or alternatively, could you have the function read_encoded_pointer
> emit the warning itself?
In some cases PC-relative addressing is valid, but sometimes it is not
(or at least is not used). The warning is there only once.
> After all, none of
> the other error/warning messages are that detailed, they don't print
> the PC value. I noticed that in a couple of the calls to
> read_encoded_pointer the code doesn't care about emitting the warning,
> why? Or add a pc parameter for the purpose of the warning.
There are four occurences:
- In DW_CFA_set_loc I don't (yet) handle pcrel addressing, because I
have never seen it in .*_frame. That's why I print a warning - If I'll
ever see it I'll implement support for it.
- When reading pers_addr I don't care about the return value at all. I
just need to advance the pointer to data.
- Init_loc reading takes care of pcrel addressing.
- fde->address_range is always an absolute value, but encoded in a
pointer format. I don't care if it is in pcrel format or not - it's just
a difference between two pointers.
There are no other calls to read_encoded_pointer() in dwarf2cfi.c
> About the eh_frame part of the patch.
> I don't really like the use of eh_frame as you have in dwarf2_build_frame_info.
> Could you try to figure out a simpler way to deal with the two cases?
> You could use an enumeration for eh_frame.
Well, yes, actually. But then I would have to change:
if(eh_frame) ...
to
if(frame == EH_ONLY || frame == EH_SECOND) ...
What about making local macros IS_DEBUG_FRAME(), IS_EH_FRAME(),
IS_EH_FRAME_ONLY(), ...?
> Could you do 2 passes, one for each section?
Hm? I don't understand what you mean...
> I am not able to apply your patch, which I usually do, to try a test
> run. Is there anyway you can regenerate the patch? Maybe with a unified
> diff instead? (it's just that I find it easier to read)
> I would like to give you more intelligent comments about the eh_frame
> part, but I need to apply the patch first.
The cfi-huge5.diff was made against clean rev 1.7 of dwarf2cfi.c file.
For me it applies cleanly against this revision.
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* +420 2 9654 5373 * http://www.suse.cz
next prev parent reply other threads:[~2002-06-11 15:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-31 10:21 Michal Ludvig
2002-06-03 6:43 ` Andrew Cagney
2002-06-04 4:35 ` Michal Ludvig
2002-06-10 20:21 ` Elena Zannoni
2002-06-11 8:28 ` Michal Ludvig [this message]
2002-06-11 8:56 ` Daniel Jacobowitz
2002-06-11 14:00 ` Elena Zannoni
[not found] ` <3D08EB06.9030200@suse.cz>
2002-06-19 6:48 ` Elena Zannoni
2002-06-19 6:48 ` Elena Zannoni
2002-06-13 12:02 Michal Ludvig
2002-07-18 5:54 Michal Ludvig
2002-07-18 16:53 ` Jim Blandy
2002-07-19 10:49 ` Andrew Cagney
2002-07-19 12:56 ` Jim Blandy
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=3D06171B.3040709@suse.cz \
--to=mludvig@suse.cz \
--cc=ac131313@cygnus.com \
--cc=ezannoni@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