From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: cagney@gnu.org
Cc: gdb-patches@sources.redhat.com
Subject: Re: [Fwd: Re: RFA: DW_OP_piece read path]
Date: Thu, 14 Apr 2005 18:46:00 -0000 [thread overview]
Message-ID: <200504141846.j3EIkAxi005815@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <425EB411.6080109@gnu.org> (message from Andrew Cagney on Thu, 14 Apr 2005 14:18:57 -0400)
Date: Thu, 14 Apr 2005 14:18:57 -0400
From: Andrew Cagney <cagney@gnu.org>
It appears I sent this to the wrong address, sigh.
Ah, well, it's good to hear from you again. An sorry that I start
nagging again, but can you please, please, please, add an empty line
after the declaration of local variables in a block if said block is
longer than say three or four lines? The following bit lifted from
your patch provides no visual guidance at all about what's going on.
This makes working on that code for me, and most likely others, very
hard, even if I don't suffer from sleep deprivation.
+ int i;
+ long offset = 0;
+ bfd_byte *contents;
+ retval = allocate_value (SYMBOL_TYPE (var));
+ contents = value_contents_raw (retval);
+ for (i = 0; i < ctx->num_pieces; i++)
+ {
+ struct dwarf_expr_piece *p = &ctx->pieces[i];
+ if (p->in_reg)
+ {
+ bfd_byte regval[MAX_REGISTER_SIZE];
+ int gdb_regnum = DWARF2_REG_TO_REGNUM (p->value);
+ get_frame_register (frame, gdb_regnum, regval);
+ memcpy (contents + offset, regval, p->size);
+ }
+ else /* In memory? */
+ {
+ read_memory (p->value, contents + offset, p->size);
+ }
+ offset += p->size;
+ }
Otherwise, thanks! It's good to have this functionality!
Mark
prev parent reply other threads:[~2005-04-14 18:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-14 18:22 Andrew Cagney
2005-04-14 18:46 ` Mark Kettenis [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=200504141846.j3EIkAxi005815@elgar.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=cagney@gnu.org \
--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