From: Siddhesh Poyarekar <siddhesh@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] Expand variables to accommodate LONGEST enumval
Date: Mon, 24 Sep 2012 09:53:00 -0000 [thread overview]
Message-ID: <20120924152250.42bb17fa@spoyarek> (raw)
[-- Attachment #1: Type: text/plain, Size: 397 bytes --]
Hi,
While reviewing my bitpos patch[1] I found a couple of cases where a
variable that takes the value of enumval
(type.main_type.flds_bnds.fields[i].loc.enumval) is declared as int
instead of LONGEST. No regressions resulting from it. OK to commit?
Regards,
Siddhesh
gdb/ChangeLog:
* m2-typeprint.c (m2_enum): Expand LASTVAL to LONGEST.
* p-valprint.c (pascal_type_print_base): Likewise.
[-- Attachment #2: enumval.patch --]
[-- Type: text/x-patch, Size: 960 bytes --]
? .m2-typeprint.c.swp
? eliminate-vars.patch
? enumval.patch
Index: m2-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/m2-typeprint.c,v
retrieving revision 1.30
diff -u -r1.30 m2-typeprint.c
--- m2-typeprint.c 18 Apr 2012 06:46:46 -0000 1.30
+++ m2-typeprint.c 24 Sep 2012 09:33:22 -0000
@@ -587,7 +587,8 @@
void
m2_enum (struct type *type, struct ui_file *stream, int show, int level)
{
- int lastval, i, len;
+ LONGEST lastval;
+ int i, len;
if (show < 0)
{
Index: p-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/p-typeprint.c,v
retrieving revision 1.47
diff -u -r1.47 p-typeprint.c
--- p-typeprint.c 16 Aug 2012 07:36:20 -0000 1.47
+++ p-typeprint.c 24 Sep 2012 09:33:22 -0000
@@ -440,7 +440,7 @@
{
int i;
int len;
- int lastval;
+ LONGEST lastval;
enum
{
s_none, s_public, s_private, s_protected
next reply other threads:[~2012-09-24 9:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-24 9:53 Siddhesh Poyarekar [this message]
2012-09-24 10:12 ` Joel Brobecker
2012-09-24 10:25 ` Siddhesh Poyarekar
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=20120924152250.42bb17fa@spoyarek \
--to=siddhesh@redhat.com \
--cc=gdb-patches@sourceware.org \
/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