* [patch] Delete FIELD_LOC_KIND_DWARF_BLOCK, unused.
@ 2010-06-27 16:55 Doug Evans
2010-06-28 15:57 ` Jan Kratochvil
2010-06-28 17:34 ` Tom Tromey
0 siblings, 2 replies; 3+ messages in thread
From: Doug Evans @ 2010-06-27 16:55 UTC (permalink / raw)
To: gdb-patches
Hi.
This patch is strictly cleanup.
It deletes FIELD_LOC_KIND_DWARF_BLOCK as it is unused.
I will commit this in a few days if there are no objections.
[Note: There is a FIXME in gdbtypes.c:field_is_static regarding
dwarf block locations. I will delete that in a subsequent patch
to fix c++ static const member support, pr 11702.]
2010-06-27 Doug Evans <dje@google.com>
Delete FIELD_LOC_KIND_DWARF_BLOCK, unused.
* gdbtypes.h (enum field_loc_kind): Delete FIELD_LOC_KIND_DWARF_BLOCK.
(struct main_type, field loc): Delete dwarf_block.
(FIELD_DWARF_BLOCK): Delete.
(SET_FIELD_DWARF_BLOCK): Delete.
(TYPE_FIELD_DWARF_BLOCK): Delete.
* gdb-gdb.py (StructMainTypePrettyPrinter.struct_field_location_img):
Update.
Index: gdb-gdb.py
===================================================================
RCS file: /cvs/src/src/gdb/gdb-gdb.py,v
retrieving revision 1.4
diff -u -p -r1.4 gdb-gdb.py
--- gdb-gdb.py 10 Feb 2010 18:39:45 -0000 1.4
+++ gdb-gdb.py 27 Jun 2010 16:44:44 -0000
@@ -158,8 +158,6 @@ class StructMainTypePrettyPrinter:
return 'physaddr = 0x%x' % loc_val['physaddr']
elif loc_kind == "FIELD_LOC_KIND_PHYSNAME":
return 'physname = %s' % loc_val['physname']
- elif loc_kind == "FIELD_LOC_KIND_DWARF_BLOCK":
- return 'dwarf_block = %s' % loc_val['dwarf_block']
else:
return 'loc = ??? (unsupported loc_kind value)'
def struct_field_img(self, fieldno):
Index: gdbtypes.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.h,v
retrieving revision 1.130
diff -u -p -r1.130 gdbtypes.h
--- gdbtypes.h 21 Jun 2010 18:01:51 -0000 1.130
+++ gdbtypes.h 27 Jun 2010 16:44:44 -0000
@@ -342,8 +342,7 @@ enum field_loc_kind
{
FIELD_LOC_KIND_BITPOS, /* bitpos */
FIELD_LOC_KIND_PHYSADDR, /* physaddr */
- FIELD_LOC_KIND_PHYSNAME, /* physname */
- FIELD_LOC_KIND_DWARF_BLOCK /* dwarf_block */
+ FIELD_LOC_KIND_PHYSNAME /* physname */
};
/* A discriminant to determine which field in the main_type.type_specific
@@ -504,12 +503,6 @@ struct main_type
CORE_ADDR physaddr;
char *physname;
-
- /* The field location can be computed by evaluating the following DWARF
- block. This can be used in Fortran variable-length arrays, for
- instance. */
-
- struct dwarf2_locexpr_baton *dwarf_block;
}
loc;
@@ -959,7 +952,6 @@ extern void allocate_gnat_aux_type (stru
#define FIELD_BITPOS(thisfld) ((thisfld).loc.bitpos)
#define FIELD_STATIC_PHYSNAME(thisfld) ((thisfld).loc.physname)
#define FIELD_STATIC_PHYSADDR(thisfld) ((thisfld).loc.physaddr)
-#define FIELD_DWARF_BLOCK(thisfld) ((thisfld).loc.dwarf_block)
#define SET_FIELD_BITPOS(thisfld, bitpos) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_BITPOS, \
FIELD_BITPOS (thisfld) = (bitpos))
@@ -969,9 +961,6 @@ extern void allocate_gnat_aux_type (stru
#define SET_FIELD_PHYSADDR(thisfld, addr) \
(FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_PHYSADDR, \
FIELD_STATIC_PHYSADDR (thisfld) = (addr))
-#define SET_FIELD_DWARF_BLOCK(thisfld, addr) \
- (FIELD_LOC_KIND (thisfld) = FIELD_LOC_KIND_DWARF_BLOCK, \
- FIELD_DWARF_BLOCK (thisfld) = (addr))
#define FIELD_ARTIFICIAL(thisfld) ((thisfld).artificial)
#define FIELD_BITSIZE(thisfld) ((thisfld).bitsize)
@@ -982,7 +971,6 @@ extern void allocate_gnat_aux_type (stru
#define TYPE_FIELD_BITPOS(thistype, n) FIELD_BITPOS (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_STATIC_PHYSNAME(thistype, n) FIELD_STATIC_PHYSNAME (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_STATIC_PHYSADDR(thistype, n) FIELD_STATIC_PHYSADDR (TYPE_FIELD (thistype, n))
-#define TYPE_FIELD_DWARF_BLOCK(thistype, n) FIELD_DWARF_BLOCK (TYPE_FIELD (thistype, n))
#define TYPE_FIELD_ARTIFICIAL(thistype, n) FIELD_ARTIFICIAL(TYPE_FIELD(thistype,n))
#define TYPE_FIELD_BITSIZE(thistype, n) FIELD_BITSIZE(TYPE_FIELD(thistype,n))
#define TYPE_FIELD_PACKED(thistype, n) (FIELD_BITSIZE(TYPE_FIELD(thistype,n))!=0)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] Delete FIELD_LOC_KIND_DWARF_BLOCK, unused.
2010-06-27 16:55 [patch] Delete FIELD_LOC_KIND_DWARF_BLOCK, unused Doug Evans
@ 2010-06-28 15:57 ` Jan Kratochvil
2010-06-28 17:34 ` Tom Tromey
1 sibling, 0 replies; 3+ messages in thread
From: Jan Kratochvil @ 2010-06-28 15:57 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
On Sun, 27 Jun 2010 18:55:40 +0200, Doug Evans wrote:
> This patch is strictly cleanup.
> It deletes FIELD_LOC_KIND_DWARF_BLOCK as it is unused.
Just a background for it why it was introduced and why it is no longer needed
even for future additions.
It has been introduced a s part of VLA (Variable Length Arrays) patch series
importing which I never finished that time (and should start again soon).
Re: [patch] static_kind -> bit0, bit1 [Re: [gdb] Fortran dynamic arrays]
http://sourceware.org/ml/gdb-patches/2008-09/msg00425.html
# The first goal, as I understand it, is to be able to extend range
# types so that the bounds can be DWARF blocks.
Just in the meantime this FIELD_LOC_KIND_* is no longer used for array bounds
as new TYPE_RANGE_DATA different field of the union in the former place of
TYPE_FIELDS has been introduced:
[COMMIT] 64-bit range types in GDB
http://sourceware.org/ml/gdb-patches/2009-12/msg00181.html
The current FSF GDB HEAD uses just `LONGEST low, high;' for the bounds.
archer-jankratochvil-vla therefore has ported this FIELD_LOC_KIND_DWARF_BLOCK
to:
struct
{
union
{
LONGEST constant;
struct dwarf2_locexpr_baton *dwarf_block;
struct
{
struct dwarf2_loclist_baton *loclist;
struct type *type;
}
dwarf_loclist;
}
u;
enum range_bound_kind
{
RANGE_BOUND_KIND_CONSTANT,
RANGE_BOUND_KIND_DWARF_BLOCK,
RANGE_BOUND_KIND_DWARF_LOCLIST
}
kind;
}
/* Low bound of range. */
low,
/* High bound of range. */
high,
/* Byte stride of range. */
byte_stride;
But that is not currently submitted for a review.
> I will commit this in a few days if there are no objections.
BTW I agree.
Thanks,
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] Delete FIELD_LOC_KIND_DWARF_BLOCK, unused.
2010-06-27 16:55 [patch] Delete FIELD_LOC_KIND_DWARF_BLOCK, unused Doug Evans
2010-06-28 15:57 ` Jan Kratochvil
@ 2010-06-28 17:34 ` Tom Tromey
1 sibling, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2010-06-28 17:34 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
>>>>> "Doug" == Doug Evans <dje@google.com> writes:
Doug> This patch is strictly cleanup.
Doug> It deletes FIELD_LOC_KIND_DWARF_BLOCK as it is unused.
Doug> I will commit this in a few days if there are no objections.
Please do, thanks.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-28 17:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-27 16:55 [patch] Delete FIELD_LOC_KIND_DWARF_BLOCK, unused Doug Evans
2010-06-28 15:57 ` Jan Kratochvil
2010-06-28 17:34 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox