This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
FYI: pack partial_symtab a little better
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 17 Dec 2010 10:19:12 -0700
- Subject: FYI: pack partial_symtab a little better
I'm checking this in.
This patch moves a field in partial_symtab, so that it packs a little
better on x86-64. It doesn't negatively affect the packing on 32-bit
architectures.
This doesn't save much memory, but I had it lying around and figured
that it doesn't hurt.
Tom
from Tom Tromey <tromey@redhat.com>
* psympriv.h (struct partial_symtab) <readin>: Move field
earlier.
Index: psympriv.h
===================================================================
RCS file: /cvs/src/src/gdb/psympriv.h,v
retrieving revision 1.4
diff -u -r1.4 psympriv.h
--- psympriv.h 1 Oct 2010 20:26:11 -0000 1.4
+++ psympriv.h 17 Dec 2010 17:15:23 -0000
@@ -129,6 +129,12 @@
int statics_offset;
int n_static_syms;
+ /* Non-zero if the symtab corresponding to this psymtab has been
+ readin. This is located here so that this structure packs better
+ on 64-bit systems. */
+
+ unsigned char readin;
+
/* Pointer to symtab eventually allocated for this source file, 0 if
!readin or if we haven't looked for the symtab after it was readin. */
@@ -145,10 +151,6 @@
the various symbol reading modules. */
void *read_symtab_private;
-
- /* Non-zero if the symtab corresponding to this psymtab has been readin */
-
- unsigned char readin;
};
extern void sort_pst_symbols (struct partial_symtab *);