This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Expand variables to accommodate LONGEST enumval
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 24 Sep 2012 15:22:50 +0530
- Subject: [PATCH] Expand variables to accommodate LONGEST enumval
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.
? .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