|
|
2c2fa1 |
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231832
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
Index: gdb-7.5.50.20130118/gdb/symmisc.c
|
|
|
2c2fa1 |
===================================================================
|
|
|
2c2fa1 |
--- gdb-7.5.50.20130118.orig/gdb/symmisc.c 2013-01-18 23:54:57.478974289 +0100
|
|
|
2c2fa1 |
+++ gdb-7.5.50.20130118/gdb/symmisc.c 2013-01-18 23:55:41.650930254 +0100
|
|
|
2c2fa1 |
@@ -148,10 +148,10 @@ print_objfile_statistics (void)
|
|
|
2c2fa1 |
if (OBJSTAT (objfile, sz_strtab) > 0)
|
|
|
2c2fa1 |
printf_filtered (_(" Space used by a.out string tables: %d\n"),
|
|
|
2c2fa1 |
OBJSTAT (objfile, sz_strtab));
|
|
|
2c2fa1 |
- printf_filtered (_(" Total memory used for objfile obstack: %d\n"),
|
|
|
2c2fa1 |
- obstack_memory_used (&objfile->objfile_obstack));
|
|
|
2c2fa1 |
- printf_filtered (_(" Total memory used for BFD obstack: %d\n"),
|
|
|
2c2fa1 |
- obstack_memory_used (&objfile->per_bfd->storage_obstack));
|
|
|
2c2fa1 |
+ printf_filtered (_(" Total memory used for objfile obstack: %ld\n"),
|
|
|
2c2fa1 |
+ (long) obstack_memory_used (&objfile->objfile_obstack));
|
|
|
2c2fa1 |
+ printf_filtered (_(" Total memory used for BFD obstack: %ld\n"),
|
|
|
2c2fa1 |
+ (long) obstack_memory_used (&objfile->per_bfd->storage_obstack));
|
|
|
2c2fa1 |
printf_filtered (_(" Total memory used for psymbol cache: %d\n"),
|
|
|
2c2fa1 |
bcache_memory_used (psymbol_bcache_get_bcache
|
|
|
2c2fa1 |
(objfile->psymbol_cache)));
|
|
|
2c2fa1 |
Index: gdb-7.5.50.20130118/include/obstack.h
|
|
|
2c2fa1 |
===================================================================
|
|
|
2c2fa1 |
--- gdb-7.5.50.20130118.orig/include/obstack.h 2013-01-18 23:54:57.478974289 +0100
|
|
|
2c2fa1 |
+++ gdb-7.5.50.20130118/include/obstack.h 2013-01-18 23:55:10.256999188 +0100
|
|
|
2c2fa1 |
@@ -188,31 +188,31 @@ struct obstack /* control current objec
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
/* Declare the external functions we use; they are in obstack.c. */
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
-extern void _obstack_newchunk (struct obstack *, int);
|
|
|
2c2fa1 |
+extern void _obstack_newchunk (struct obstack *, PTR_INT_TYPE);
|
|
|
2c2fa1 |
extern void _obstack_free (struct obstack *, void *);
|
|
|
2c2fa1 |
-extern int _obstack_begin (struct obstack *, int, int,
|
|
|
2c2fa1 |
+extern int _obstack_begin (struct obstack *, PTR_INT_TYPE, int,
|
|
|
2c2fa1 |
void *(*) (long), void (*) (void *));
|
|
|
2c2fa1 |
-extern int _obstack_begin_1 (struct obstack *, int, int,
|
|
|
2c2fa1 |
+extern int _obstack_begin_1 (struct obstack *, PTR_INT_TYPE, int,
|
|
|
2c2fa1 |
void *(*) (void *, long),
|
|
|
2c2fa1 |
void (*) (void *, void *), void *);
|
|
|
2c2fa1 |
-extern int _obstack_memory_used (struct obstack *);
|
|
|
2c2fa1 |
+extern PTR_INT_TYPE _obstack_memory_used (struct obstack *);
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
/* Do the function-declarations after the structs
|
|
|
2c2fa1 |
but before defining the macros. */
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
void obstack_init (struct obstack *obstack);
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
-void * obstack_alloc (struct obstack *obstack, int size);
|
|
|
2c2fa1 |
+void * obstack_alloc (struct obstack *obstack, PTR_INT_TYPE size);
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
-void * obstack_copy (struct obstack *obstack, void *address, int size);
|
|
|
2c2fa1 |
-void * obstack_copy0 (struct obstack *obstack, void *address, int size);
|
|
|
2c2fa1 |
+void * obstack_copy (struct obstack *obstack, void *address, PTR_INT_TYPE size);
|
|
|
2c2fa1 |
+void * obstack_copy0 (struct obstack *obstack, void *address, PTR_INT_TYPE size);
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
void obstack_free (struct obstack *obstack, void *block);
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
-void obstack_blank (struct obstack *obstack, int size);
|
|
|
2c2fa1 |
+void obstack_blank (struct obstack *obstack, PTR_INT_TYPE size);
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
-void obstack_grow (struct obstack *obstack, void *data, int size);
|
|
|
2c2fa1 |
-void obstack_grow0 (struct obstack *obstack, void *data, int size);
|
|
|
2c2fa1 |
+void obstack_grow (struct obstack *obstack, void *data, PTR_INT_TYPE size);
|
|
|
2c2fa1 |
+void obstack_grow0 (struct obstack *obstack, void *data, PTR_INT_TYPE size);
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
void obstack_1grow (struct obstack *obstack, int data_char);
|
|
|
2c2fa1 |
void obstack_ptr_grow (struct obstack *obstack, void *data);
|
|
|
2c2fa1 |
@@ -220,20 +220,20 @@ void obstack_int_grow (struct obstack *o
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
void * obstack_finish (struct obstack *obstack);
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
-int obstack_object_size (struct obstack *obstack);
|
|
|
2c2fa1 |
+PTR_INT_TYPE obstack_object_size (struct obstack *obstack);
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
-int obstack_room (struct obstack *obstack);
|
|
|
2c2fa1 |
-void obstack_make_room (struct obstack *obstack, int size);
|
|
|
2c2fa1 |
+PTR_INT_TYPE obstack_room (struct obstack *obstack);
|
|
|
2c2fa1 |
+void obstack_make_room (struct obstack *obstack, PTR_INT_TYPE size);
|
|
|
2c2fa1 |
void obstack_1grow_fast (struct obstack *obstack, int data_char);
|
|
|
2c2fa1 |
void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
|
|
|
2c2fa1 |
void obstack_int_grow_fast (struct obstack *obstack, int data);
|
|
|
2c2fa1 |
-void obstack_blank_fast (struct obstack *obstack, int size);
|
|
|
2c2fa1 |
+void obstack_blank_fast (struct obstack *obstack, PTR_INT_TYPE size);
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
void * obstack_base (struct obstack *obstack);
|
|
|
2c2fa1 |
void * obstack_next_free (struct obstack *obstack);
|
|
|
2c2fa1 |
int obstack_alignment_mask (struct obstack *obstack);
|
|
|
2c2fa1 |
-int obstack_chunk_size (struct obstack *obstack);
|
|
|
2c2fa1 |
-int obstack_memory_used (struct obstack *obstack);
|
|
|
2c2fa1 |
+size_t obstack_chunk_size (struct obstack *obstack);
|
|
|
2c2fa1 |
+size_t obstack_memory_used (struct obstack *obstack);
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
/* Error handler called when `obstack_chunk_alloc' failed to allocate
|
|
|
2c2fa1 |
more memory. This can be set to a user defined function. The
|
|
|
2c2fa1 |
@@ -318,7 +318,7 @@ extern int obstack_exit_failure;
|
|
|
2c2fa1 |
# define obstack_make_room(OBSTACK,length) \
|
|
|
2c2fa1 |
__extension__ \
|
|
|
2c2fa1 |
({ struct obstack *__o = (OBSTACK); \
|
|
|
2c2fa1 |
- int __len = (length); \
|
|
|
2c2fa1 |
+ PTR_INT_TYPE __len = (length); \
|
|
|
2c2fa1 |
if (__o->chunk_limit - __o->next_free < __len) \
|
|
|
2c2fa1 |
_obstack_newchunk (__o, __len); \
|
|
|
2c2fa1 |
(void) 0; })
|
|
|
2c2fa1 |
@@ -331,7 +331,7 @@ __extension__ \
|
|
|
2c2fa1 |
# define obstack_grow(OBSTACK,where,length) \
|
|
|
2c2fa1 |
__extension__ \
|
|
|
2c2fa1 |
({ struct obstack *__o = (OBSTACK); \
|
|
|
2c2fa1 |
- int __len = (length); \
|
|
|
2c2fa1 |
+ PTR_INT_TYPE __len = (length); \
|
|
|
2c2fa1 |
if (__o->next_free + __len > __o->chunk_limit) \
|
|
|
2c2fa1 |
_obstack_newchunk (__o, __len); \
|
|
|
2c2fa1 |
_obstack_memcpy (__o->next_free, (where), __len); \
|
|
|
2c2fa1 |
@@ -341,7 +341,7 @@ __extension__ \
|
|
|
2c2fa1 |
# define obstack_grow0(OBSTACK,where,length) \
|
|
|
2c2fa1 |
__extension__ \
|
|
|
2c2fa1 |
({ struct obstack *__o = (OBSTACK); \
|
|
|
2c2fa1 |
- int __len = (length); \
|
|
|
2c2fa1 |
+ PTR_INT_TYPE __len = (length); \
|
|
|
2c2fa1 |
if (__o->next_free + __len + 1 > __o->chunk_limit) \
|
|
|
2c2fa1 |
_obstack_newchunk (__o, __len + 1); \
|
|
|
2c2fa1 |
_obstack_memcpy (__o->next_free, (where), __len); \
|
|
|
2c2fa1 |
@@ -392,7 +392,7 @@ __extension__ \
|
|
|
2c2fa1 |
# define obstack_blank(OBSTACK,length) \
|
|
|
2c2fa1 |
__extension__ \
|
|
|
2c2fa1 |
({ struct obstack *__o = (OBSTACK); \
|
|
|
2c2fa1 |
- int __len = (length); \
|
|
|
2c2fa1 |
+ PTR_INT_TYPE __len = (length); \
|
|
|
2c2fa1 |
if (__o->chunk_limit - __o->next_free < __len) \
|
|
|
2c2fa1 |
_obstack_newchunk (__o, __len); \
|
|
|
2c2fa1 |
obstack_blank_fast (__o, __len); \
|
|
|
2c2fa1 |
Index: gdb-7.5.50.20130118/libiberty/obstack.c
|
|
|
2c2fa1 |
===================================================================
|
|
|
2c2fa1 |
--- gdb-7.5.50.20130118.orig/libiberty/obstack.c 2013-01-18 23:54:57.478974289 +0100
|
|
|
2c2fa1 |
+++ gdb-7.5.50.20130118/libiberty/obstack.c 2013-01-18 23:55:10.256999188 +0100
|
|
|
2c2fa1 |
@@ -44,9 +44,11 @@
|
|
|
2c2fa1 |
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
|
|
2c2fa1 |
#include <gnu-versions.h>
|
|
|
2c2fa1 |
#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
|
|
|
2c2fa1 |
+#if 0 /* 64-bit obstack is not compatible with any glibc implementation. */
|
|
|
2c2fa1 |
#define ELIDE_CODE
|
|
|
2c2fa1 |
#endif
|
|
|
2c2fa1 |
#endif
|
|
|
2c2fa1 |
+#endif
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
#ifndef ELIDE_CODE
|
|
|
2c2fa1 |
@@ -139,7 +141,7 @@ struct obstack *_obstack;
|
|
|
2c2fa1 |
free up some memory, then call this again. */
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
int
|
|
|
2c2fa1 |
-_obstack_begin (struct obstack *h, int size, int alignment,
|
|
|
2c2fa1 |
+_obstack_begin (struct obstack *h, PTR_INT_TYPE size, int alignment,
|
|
|
2c2fa1 |
POINTER (*chunkfun) (long), void (*freefun) (void *))
|
|
|
2c2fa1 |
{
|
|
|
2c2fa1 |
register struct _obstack_chunk *chunk; /* points to new chunk */
|
|
|
2c2fa1 |
@@ -183,7 +185,7 @@ _obstack_begin (struct obstack *h, int s
|
|
|
2c2fa1 |
}
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
int
|
|
|
2c2fa1 |
-_obstack_begin_1 (struct obstack *h, int size, int alignment,
|
|
|
2c2fa1 |
+_obstack_begin_1 (struct obstack *h, PTR_INT_TYPE size, int alignment,
|
|
|
2c2fa1 |
POINTER (*chunkfun) (POINTER, long),
|
|
|
2c2fa1 |
void (*freefun) (POINTER, POINTER), POINTER arg)
|
|
|
2c2fa1 |
{
|
|
|
2c2fa1 |
@@ -235,7 +237,7 @@ _obstack_begin_1 (struct obstack *h, int
|
|
|
2c2fa1 |
to the beginning of the new one. */
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
void
|
|
|
2c2fa1 |
-_obstack_newchunk (struct obstack *h, int length)
|
|
|
2c2fa1 |
+_obstack_newchunk (struct obstack *h, PTR_INT_TYPE length)
|
|
|
2c2fa1 |
{
|
|
|
2c2fa1 |
register struct _obstack_chunk *old_chunk = h->chunk;
|
|
|
2c2fa1 |
register struct _obstack_chunk *new_chunk;
|
|
|
2c2fa1 |
@@ -388,11 +390,11 @@ obstack_free (struct obstack *h, POINTER
|
|
|
2c2fa1 |
abort ();
|
|
|
2c2fa1 |
}
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
-int
|
|
|
2c2fa1 |
+PTR_INT_TYPE
|
|
|
2c2fa1 |
_obstack_memory_used (struct obstack *h)
|
|
|
2c2fa1 |
{
|
|
|
2c2fa1 |
register struct _obstack_chunk* lp;
|
|
|
2c2fa1 |
- register int nbytes = 0;
|
|
|
2c2fa1 |
+ register PTR_INT_TYPE nbytes = 0;
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
for (lp = h->chunk; lp != 0; lp = lp->prev)
|
|
|
2c2fa1 |
{
|
|
|
2c2fa1 |
@@ -421,6 +423,7 @@ print_and_abort (void)
|
|
|
2c2fa1 |
}
|
|
|
2c2fa1 |
|
|
|
2c2fa1 |
#if 0
|
|
|
2c2fa1 |
+/* These functions are now broken for 64-bit obstack! */
|
|
|
2c2fa1 |
/* These are now turned off because the applications do not use it
|
|
|
2c2fa1 |
and it uses bcopy via obstack_grow, which causes trouble on sysV. */
|
|
|
2c2fa1 |
|