From: David Carlton <carlton@math.stanford.edu>
To: gdb-patches@sources.redhat.com
Subject: [patch] some mindless additions of BLOCK_ macros
Date: Wed, 23 Oct 2002 14:17:00 -0000 [thread overview]
Message-ID: <ro165vs4zzf.fsf@jackfruit.Stanford.EDU> (raw)
I recently noticed that the BLOCK_ macros weren't used everywhere they
could be. I know Andrew doesn't like macros, but given that these
ones are used almost everywhere, they might as well be used
everywhere.
I've tested the parse.c part of this by doing a make check, the
x86-64-tdep.c part by doing an all targets build and noticing that it
still compiles, and the objc-lang.c part hasn't been tested at all.
They're all trivial changes, so that amount of testing seems to me to
be sufficient.
This patch seems obvious to me; if nobody complains, I'll commit it in
a day or two.
David Carlton
carlton@math.stanford.edu
2002-10-23 David Carlton <carlton@math.stanford.edu>
* parse.c (parse_exp_1): Use BLOCK_START.
* x86-64-tdep.c (x86_64_skip_prologue): Use BLOCK_END,
SYMBOL_BLOCK_VALUE.
* objc-lang.c (find_methods): Use BLOCK_START, BLOCK_END.
Index: parse.c
===================================================================
RCS file: /cvs/src/src/gdb/parse.c,v
retrieving revision 1.29
diff -u -p -r1.29 parse.c
--- parse.c 14 Oct 2002 01:50:44 -0000 1.29
+++ parse.c 23 Oct 2002 20:23:36 -0000
@@ -1123,7 +1123,7 @@ parse_exp_1 (char **stringptr, struct bl
if (block)
{
expression_context_block = block;
- expression_context_pc = block->startaddr;
+ expression_context_pc = BLOCK_START (block);
}
else
expression_context_block = get_selected_block (&expression_context_pc);
Index: x86-64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v
retrieving revision 1.27
diff -u -p -r1.27 x86-64-tdep.c
--- x86-64-tdep.c 12 Sep 2002 08:39:26 -0000 1.27
+++ x86-64-tdep.c 23 Oct 2002 20:23:52 -0000
@@ -889,7 +889,7 @@ x86_64_skip_prologue (CORE_ADDR pc)
if (!v_function || !v_function->ginfo.value.block || !v_sal.symtab)
return pc;
- endaddr = v_function->ginfo.value.block->endaddr;
+ endaddr = BLOCK_END (SYMBOL_BLOCK_VALUE (v_function));
for (i = 0; i < v_sal.symtab->linetable->nitems; i++)
if (v_sal.symtab->linetable->item[i].pc >= pc
Index: objc-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/objc-lang.c,v
retrieving revision 1.4
diff -u -p -r1.4 objc-lang.c
--- objc-lang.c 4 Oct 2002 01:18:48 -0000 1.4
+++ objc-lang.c 23 Oct 2002 20:24:04 -0000
@@ -1320,8 +1320,8 @@ find_methods (struct symtab *symtab, cha
continue;
if (symtab)
- if ((SYMBOL_VALUE_ADDRESS (msymbol) < block->startaddr) ||
- (SYMBOL_VALUE_ADDRESS (msymbol) >= block->endaddr))
+ if ((SYMBOL_VALUE_ADDRESS (msymbol) < BLOCK_START (block)) ||
+ (SYMBOL_VALUE_ADDRESS (msymbol) >= BLOCK_END (block)))
/* Not in the specified symtab. */
continue;
next reply other threads:[~2002-10-23 21:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-23 14:17 David Carlton [this message]
2002-10-23 16:04 ` Andrew Cagney
2002-10-23 16:19 ` David Carlton
2002-10-23 16:59 ` Andrew Cagney
2002-10-23 17:20 ` David Carlton
2002-10-23 16:24 ` Daniel Jacobowitz
2002-10-23 16:50 ` David Carlton
2002-10-23 17:18 ` Elena Zannoni
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=ro165vs4zzf.fsf@jackfruit.Stanford.EDU \
--to=carlton@math.stanford.edu \
--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