Building solib-target.c when CORE_ADDR != ULONGEST.

Pedro Alves pedro_alves@portugalmail.pt
Sun Jul 8 01:22:00 GMT 2007


Hi,

Building solib-target.c on host where CORE_ADDR != ULONGEST is broken,
because of this:

static void
library_list_start_segment (struct gdb_xml_parser *parser,
			    const struct gdb_xml_element *element,
			    void *user_data, VEC(gdb_xml_value_s) *attributes)
{
    VEC(lm_info_p) **list = user_data;
    struct lm_info *last = VEC_last (lm_info_p, *list);
    ULONGEST *address_p = VEC_index (gdb_xml_value_s, attributes, 0)->value;

    VEC_safe_push (CORE_ADDR, last->segment_bases, address_p);
}

Pushing a ULONGEST* into a CORE_ADDR VEC doesn't work.

I'm using the attached patch to try to catch invalid data send by a
(remote) target, but I guess it isn't correct for all archs.

I was building arm-wince-mingw32ce on i686-pc-cygwin.

Cheers,
Pedro Alves

-------------- next part --------------
A non-text attachment was scrubbed...
Name: solib-target_CORE_ADDR.diff
Type: text/x-diff
Size: 1952 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20070708/97392c95/attachment.bin>


More information about the Gdb-patches mailing list