+2007-04-05 Roland McGrath <roland@redhat.com>
+
+ * dwarf_ranges.c (dwarf_ranges): Don't sign-extend 32-bit BEGIN
+ address to check for all-ones base address entry. Check directly.
+ Reported by Sébastien Dugué <sebastien.dugue@bull.net>.
+
2007-03-25 Roland McGrath <roland@redhat.com>
* dwarf_begin_elf.c (check_section): Return Dwarf * instead of void.
/* Enumerate the PC ranges covered by a DIE.
- Copyright (C) 2005 Red Hat, Inc.
+ Copyright (C) 2005, 2007 Red Hat, Inc.
This file is part of Red Hat elfutils.
Red Hat elfutils is free software; you can redistribute it and/or modify
{
begin = read_8ubyte_unaligned_inc (die->cu->dbg, readp);
end = read_8ubyte_unaligned_inc (die->cu->dbg, readp);
+ if (begin == (uint64_t) -1l) /* Base address entry. */
+ {
+ *basep = end;
+ goto next;
+ }
}
else
{
- begin = (Dwarf_Sword) read_4sbyte_unaligned_inc (die->cu->dbg,
- readp);
+ begin = read_4ubyte_unaligned_inc (die->cu->dbg, readp);
end = read_4ubyte_unaligned_inc (die->cu->dbg, readp);
- }
-
- if (begin == (Dwarf_Addr) -1l) /* Base address entry. */
- {
- *basep = end;
- goto next;
+ if (begin == (uint32_t) -1) /* Base address entry. */
+ {
+ *basep = end;
+ goto next;
+ }
}
if (begin == 0 && end == 0) /* End of list entry. */