* [PATCH] Expand variables to accommodate LONGEST enumval
@ 2012-09-24 9:53 Siddhesh Poyarekar
2012-09-24 10:12 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: Siddhesh Poyarekar @ 2012-09-24 9:53 UTC (permalink / raw)
To: gdb-patches
[-- 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Expand variables to accommodate LONGEST enumval
2012-09-24 9:53 [PATCH] Expand variables to accommodate LONGEST enumval Siddhesh Poyarekar
@ 2012-09-24 10:12 ` Joel Brobecker
2012-09-24 10:25 ` Siddhesh Poyarekar
0 siblings, 1 reply; 3+ messages in thread
From: Joel Brobecker @ 2012-09-24 10:12 UTC (permalink / raw)
To: Siddhesh Poyarekar; +Cc: gdb-patches
> gdb/ChangeLog:
>
> * m2-typeprint.c (m2_enum): Expand LASTVAL to LONGEST.
> * p-valprint.c (pascal_type_print_base): Likewise.
Looks good to me. I am overstepping my bounds a little, but for such
a small change, I think it'll be OK.
Looking at the code, I think that the variable definitions can be moved
inside the block where they are actually used. But that's for another
patch.
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Expand variables to accommodate LONGEST enumval
2012-09-24 10:12 ` Joel Brobecker
@ 2012-09-24 10:25 ` Siddhesh Poyarekar
0 siblings, 0 replies; 3+ messages in thread
From: Siddhesh Poyarekar @ 2012-09-24 10:25 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
On Mon, 24 Sep 2012 12:12:22 +0200, Joel wrote:
> > gdb/ChangeLog:
> >
> > * m2-typeprint.c (m2_enum): Expand LASTVAL to LONGEST.
> > * p-valprint.c (pascal_type_print_base): Likewise.
>
> Looks good to me. I am overstepping my bounds a little, but for such
> a small change, I think it'll be OK.
Thanks, committed.
Regards,
Siddhesh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-24 10:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-24 9:53 [PATCH] Expand variables to accommodate LONGEST enumval Siddhesh Poyarekar
2012-09-24 10:12 ` Joel Brobecker
2012-09-24 10:25 ` Siddhesh Poyarekar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox