]>
Commit | Line | Data |
---|---|---|
3a58abaf AM |
1 | https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231832 |
2 | ||
3 | ||
f412e1b4 | 4 | Index: gdb-7.4.50.20111218/gdb/symmisc.c |
3a58abaf | 5 | =================================================================== |
f412e1b4 PS |
6 | --- gdb-7.4.50.20111218.orig/gdb/symmisc.c 2011-04-04 17:19:59.000000000 +0200 |
7 | +++ gdb-7.4.50.20111218/gdb/symmisc.c 2011-12-19 00:28:18.189232014 +0100 | |
8 | @@ -147,8 +147,8 @@ print_objfile_statistics (void) | |
3a58abaf AM |
9 | if (OBJSTAT (objfile, sz_strtab) > 0) |
10 | printf_filtered (_(" Space used by a.out string tables: %d\n"), | |
11 | OBJSTAT (objfile, sz_strtab)); | |
12 | - printf_filtered (_(" Total memory used for objfile obstack: %d\n"), | |
13 | - obstack_memory_used (&objfile->objfile_obstack)); | |
14 | + printf_filtered (_(" Total memory used for objfile obstack: %ld\n"), | |
15 | + (long) obstack_memory_used (&objfile->objfile_obstack)); | |
16 | printf_filtered (_(" Total memory used for psymbol cache: %d\n"), | |
6ed6bacf AM |
17 | bcache_memory_used (psymbol_bcache_get_bcache |
18 | (objfile->psymbol_cache))); | |
f412e1b4 | 19 | Index: gdb-7.4.50.20111218/include/obstack.h |
3a58abaf | 20 | =================================================================== |
f412e1b4 PS |
21 | --- gdb-7.4.50.20111218.orig/include/obstack.h 2011-10-22 03:35:29.000000000 +0200 |
22 | +++ gdb-7.4.50.20111218/include/obstack.h 2011-12-19 00:28:18.189232014 +0100 | |
3a58abaf AM |
23 | @@ -188,31 +188,31 @@ struct obstack /* control current objec |
24 | ||
25 | /* Declare the external functions we use; they are in obstack.c. */ | |
26 | ||
27 | -extern void _obstack_newchunk (struct obstack *, int); | |
28 | +extern void _obstack_newchunk (struct obstack *, PTR_INT_TYPE); | |
29 | extern void _obstack_free (struct obstack *, void *); | |
30 | -extern int _obstack_begin (struct obstack *, int, int, | |
31 | +extern int _obstack_begin (struct obstack *, PTR_INT_TYPE, int, | |
32 | void *(*) (long), void (*) (void *)); | |
33 | -extern int _obstack_begin_1 (struct obstack *, int, int, | |
34 | +extern int _obstack_begin_1 (struct obstack *, PTR_INT_TYPE, int, | |
35 | void *(*) (void *, long), | |
36 | void (*) (void *, void *), void *); | |
37 | -extern int _obstack_memory_used (struct obstack *); | |
38 | +extern PTR_INT_TYPE _obstack_memory_used (struct obstack *); | |
39 | \f | |
40 | /* Do the function-declarations after the structs | |
41 | but before defining the macros. */ | |
42 | ||
43 | void obstack_init (struct obstack *obstack); | |
44 | ||
45 | -void * obstack_alloc (struct obstack *obstack, int size); | |
46 | +void * obstack_alloc (struct obstack *obstack, PTR_INT_TYPE size); | |
47 | ||
48 | -void * obstack_copy (struct obstack *obstack, void *address, int size); | |
49 | -void * obstack_copy0 (struct obstack *obstack, void *address, int size); | |
50 | +void * obstack_copy (struct obstack *obstack, void *address, PTR_INT_TYPE size); | |
51 | +void * obstack_copy0 (struct obstack *obstack, void *address, PTR_INT_TYPE size); | |
52 | ||
53 | void obstack_free (struct obstack *obstack, void *block); | |
54 | ||
55 | -void obstack_blank (struct obstack *obstack, int size); | |
56 | +void obstack_blank (struct obstack *obstack, PTR_INT_TYPE size); | |
57 | ||
58 | -void obstack_grow (struct obstack *obstack, void *data, int size); | |
59 | -void obstack_grow0 (struct obstack *obstack, void *data, int size); | |
60 | +void obstack_grow (struct obstack *obstack, void *data, PTR_INT_TYPE size); | |
61 | +void obstack_grow0 (struct obstack *obstack, void *data, PTR_INT_TYPE size); | |
62 | ||
63 | void obstack_1grow (struct obstack *obstack, int data_char); | |
64 | void obstack_ptr_grow (struct obstack *obstack, void *data); | |
65 | @@ -220,20 +220,20 @@ void obstack_int_grow (struct obstack *o | |
66 | ||
67 | void * obstack_finish (struct obstack *obstack); | |
68 | ||
69 | -int obstack_object_size (struct obstack *obstack); | |
70 | +PTR_INT_TYPE obstack_object_size (struct obstack *obstack); | |
71 | ||
72 | -int obstack_room (struct obstack *obstack); | |
73 | -void obstack_make_room (struct obstack *obstack, int size); | |
74 | +PTR_INT_TYPE obstack_room (struct obstack *obstack); | |
75 | +void obstack_make_room (struct obstack *obstack, PTR_INT_TYPE size); | |
76 | void obstack_1grow_fast (struct obstack *obstack, int data_char); | |
77 | void obstack_ptr_grow_fast (struct obstack *obstack, void *data); | |
78 | void obstack_int_grow_fast (struct obstack *obstack, int data); | |
79 | -void obstack_blank_fast (struct obstack *obstack, int size); | |
80 | +void obstack_blank_fast (struct obstack *obstack, PTR_INT_TYPE size); | |
81 | ||
82 | void * obstack_base (struct obstack *obstack); | |
83 | void * obstack_next_free (struct obstack *obstack); | |
84 | int obstack_alignment_mask (struct obstack *obstack); | |
85 | -int obstack_chunk_size (struct obstack *obstack); | |
86 | -int obstack_memory_used (struct obstack *obstack); | |
87 | +size_t obstack_chunk_size (struct obstack *obstack); | |
88 | +size_t obstack_memory_used (struct obstack *obstack); | |
89 | ||
90 | /* Error handler called when `obstack_chunk_alloc' failed to allocate | |
91 | more memory. This can be set to a user defined function. The | |
92 | @@ -318,7 +318,7 @@ extern int obstack_exit_failure; | |
93 | # define obstack_make_room(OBSTACK,length) \ | |
94 | __extension__ \ | |
95 | ({ struct obstack *__o = (OBSTACK); \ | |
96 | - int __len = (length); \ | |
97 | + PTR_INT_TYPE __len = (length); \ | |
98 | if (__o->chunk_limit - __o->next_free < __len) \ | |
99 | _obstack_newchunk (__o, __len); \ | |
100 | (void) 0; }) | |
101 | @@ -331,7 +331,7 @@ __extension__ \ | |
102 | # define obstack_grow(OBSTACK,where,length) \ | |
103 | __extension__ \ | |
104 | ({ struct obstack *__o = (OBSTACK); \ | |
105 | - int __len = (length); \ | |
106 | + PTR_INT_TYPE __len = (length); \ | |
107 | if (__o->next_free + __len > __o->chunk_limit) \ | |
108 | _obstack_newchunk (__o, __len); \ | |
109 | _obstack_memcpy (__o->next_free, (where), __len); \ | |
110 | @@ -341,7 +341,7 @@ __extension__ \ | |
111 | # define obstack_grow0(OBSTACK,where,length) \ | |
112 | __extension__ \ | |
113 | ({ struct obstack *__o = (OBSTACK); \ | |
114 | - int __len = (length); \ | |
115 | + PTR_INT_TYPE __len = (length); \ | |
116 | if (__o->next_free + __len + 1 > __o->chunk_limit) \ | |
117 | _obstack_newchunk (__o, __len + 1); \ | |
118 | _obstack_memcpy (__o->next_free, (where), __len); \ | |
119 | @@ -392,7 +392,7 @@ __extension__ \ | |
120 | # define obstack_blank(OBSTACK,length) \ | |
121 | __extension__ \ | |
122 | ({ struct obstack *__o = (OBSTACK); \ | |
123 | - int __len = (length); \ | |
124 | + PTR_INT_TYPE __len = (length); \ | |
125 | if (__o->chunk_limit - __o->next_free < __len) \ | |
126 | _obstack_newchunk (__o, __len); \ | |
127 | obstack_blank_fast (__o, __len); \ | |
f412e1b4 | 128 | Index: gdb-7.4.50.20111218/libiberty/obstack.c |
3a58abaf | 129 | =================================================================== |
f412e1b4 PS |
130 | --- gdb-7.4.50.20111218.orig/libiberty/obstack.c 2005-05-10 17:33:33.000000000 +0200 |
131 | +++ gdb-7.4.50.20111218/libiberty/obstack.c 2011-12-19 00:28:18.191232006 +0100 | |
3a58abaf AM |
132 | @@ -44,9 +44,11 @@ |
133 | #if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1 | |
134 | #include <gnu-versions.h> | |
135 | #if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION | |
136 | +#if 0 /* 64-bit obstack is not compatible with any glibc implementation. */ | |
137 | #define ELIDE_CODE | |
138 | #endif | |
139 | #endif | |
140 | +#endif | |
141 | ||
142 | ||
143 | #ifndef ELIDE_CODE | |
144 | @@ -139,7 +141,7 @@ struct obstack *_obstack; | |
145 | free up some memory, then call this again. */ | |
146 | ||
147 | int | |
148 | -_obstack_begin (struct obstack *h, int size, int alignment, | |
149 | +_obstack_begin (struct obstack *h, PTR_INT_TYPE size, int alignment, | |
150 | POINTER (*chunkfun) (long), void (*freefun) (void *)) | |
151 | { | |
152 | register struct _obstack_chunk *chunk; /* points to new chunk */ | |
153 | @@ -183,7 +185,7 @@ _obstack_begin (struct obstack *h, int s | |
154 | } | |
155 | ||
156 | int | |
157 | -_obstack_begin_1 (struct obstack *h, int size, int alignment, | |
158 | +_obstack_begin_1 (struct obstack *h, PTR_INT_TYPE size, int alignment, | |
159 | POINTER (*chunkfun) (POINTER, long), | |
160 | void (*freefun) (POINTER, POINTER), POINTER arg) | |
161 | { | |
162 | @@ -235,7 +237,7 @@ _obstack_begin_1 (struct obstack *h, int | |
163 | to the beginning of the new one. */ | |
164 | ||
165 | void | |
166 | -_obstack_newchunk (struct obstack *h, int length) | |
167 | +_obstack_newchunk (struct obstack *h, PTR_INT_TYPE length) | |
168 | { | |
169 | register struct _obstack_chunk *old_chunk = h->chunk; | |
170 | register struct _obstack_chunk *new_chunk; | |
171 | @@ -388,11 +390,11 @@ obstack_free (struct obstack *h, POINTER | |
172 | abort (); | |
173 | } | |
174 | \f | |
175 | -int | |
176 | +PTR_INT_TYPE | |
177 | _obstack_memory_used (struct obstack *h) | |
178 | { | |
179 | register struct _obstack_chunk* lp; | |
180 | - register int nbytes = 0; | |
181 | + register PTR_INT_TYPE nbytes = 0; | |
182 | ||
183 | for (lp = h->chunk; lp != 0; lp = lp->prev) | |
184 | { | |
185 | @@ -421,6 +423,7 @@ print_and_abort (void) | |
186 | } | |
187 | \f | |
188 | #if 0 | |
189 | +/* These functions are now broken for 64-bit obstack! */ | |
190 | /* These are now turned off because the applications do not use it | |
191 | and it uses bcopy via obstack_grow, which causes trouble on sysV. */ | |
192 |