This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [3/4] RFC: add DWARF index support


Hi Tom,

OpenOffice.org Fedora-13-x86_64 `thread apply all bt full' did for me:

system =0m9.079s
HEAD   =0m7.671s
noindex=0m7.864s
index  =0m1.811s
(44MB of indexes)

Nice. :-)


On Thu, 01 Jul 2010 00:45:55 +0200, Tom Tromey wrote:
> +/* All offsets in the index are of this type.  It must be
> +   architecture-independent.  */
> +typedef uint32_t offset_type;

It should be 64bit, Fedora already has to carry 64bit obstack patch for >2GB
.debug files. I have seen only an artificial reproducer for >2GB .debug, no
real world case, though.
http://sourceware.org/ml/libc-alpha/2007-01/msg00090.html


> +  if (stat (objfile->name, &obstat) < 0)

dwarf2read.c:1764: error: implicit declaration of function ‘stat’
dwarf2read.c:1771: error: implicit declaration of function ‘fstat’
->
#include <sys/stat.h>


> +static void
> +create_addrmap_from_index (struct objfile *objfile, struct mapped_index *index)
> +      addrmap_set_empty (mutable_map, lo + baseaddr, hi + baseaddr,
> +			 dwarf2_per_objfile->all_comp_units[cu_index]);

addrmap_set_empty has parameter end_inclusive, "hi" is end-exclusive.


> +  filename = concat (dir, "/", lbasename (objfile->name), INDEX_SUFFIX, NULL);

Here is some cross-platform path issue.  Also there should be `(char *) NULL'.


> +   1. The file header.  This is a sequence of values, of offset_type
> +   unless otherwise noted:

I would prefer there some simple magic (for file(1)).


> +   [0] The version number.  Currently 1.
> +   [1] The mtime of the objfile, as a 64-bit little-endian value.

Do you have some specific needs for storing timestamp into the file?
When such index files will be packaged by distros it may create needless
differences across various verifications.  Isn't make(1)-like timestamp
dependency enough?


> +	TRY_CATCH (except, RETURN_MASK_ALL)

Only RETURN_MASK_ERROR probably.


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]