* PATCH: PR shlibs/11293: gdb is broken on Linux/i386
@ 2010-02-17 20:10 H.J. Lu
2010-02-17 20:29 ` Jan Kratochvil
2010-02-17 20:33 ` Daniel Jacobowitz
0 siblings, 2 replies; 3+ messages in thread
From: H.J. Lu @ 2010-02-17 20:10 UTC (permalink / raw)
To: GDB
Hi,
ULONGEST is 64bit on Linux/i386. We should check CORE_ADDR instead
of ULONGEST for address size. OK to install?
Thanks.
H.J.
--
2010-02-17 H.J. Lu <hongjiu.lu@intel.com>
PR shlibs/11293
* solib-svr4.c (enable_break): Check size of CORE_ADDR instead
of ULONGEST for address size.
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index b3b9e00..f4fccb2 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1459,7 +1459,7 @@ enable_break (struct svr4_info *info, int from_tty)
invalid addresses like 0x101234567 for 32bit inferiors on 64bit
GDB. */
- if (addr_bit < (sizeof (ULONGEST) * HOST_CHAR_BIT))
+ if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
{
CORE_ADDR space_size = (ULONGEST) 1 << addr_bit;
CORE_ADDR tmp_entry_point = exec_entry_point (tmp_bfd,
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: PATCH: PR shlibs/11293: gdb is broken on Linux/i386
2010-02-17 20:10 PATCH: PR shlibs/11293: gdb is broken on Linux/i386 H.J. Lu
@ 2010-02-17 20:29 ` Jan Kratochvil
2010-02-17 20:33 ` Daniel Jacobowitz
1 sibling, 0 replies; 3+ messages in thread
From: Jan Kratochvil @ 2010-02-17 20:29 UTC (permalink / raw)
To: H.J. Lu; +Cc: GDB
On Wed, 17 Feb 2010 21:10:31 +0100, H.J. Lu wrote:
> ULONGEST is 64bit on Linux/i386. We should check CORE_ADDR instead
> of ULONGEST for address size. OK to install?
# solib-svr4.c:1468: internal-error: enable_break: Assertion `load_addr < space_size' failed.
# For 32bit, addr_bit is 32 and CORE_ADDR is 4 byte.
I was regression-testing it for i386 with --enable-64-bit-bfd, sorry.
> - if (addr_bit < (sizeof (ULONGEST) * HOST_CHAR_BIT))
> + if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
> {
> CORE_ADDR space_size = (ULONGEST) 1 << addr_bit;
> CORE_ADDR tmp_entry_point = exec_entry_point (tmp_bfd,
This code in GDB commonly uses even:
CORE_ADDR space_size = (CORE_ADDR) 1 << addr_bit;
I copied it from a wrong place.
Yes, I agree with your fix (this is not an approval).
Thanks,
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: PATCH: PR shlibs/11293: gdb is broken on Linux/i386
2010-02-17 20:10 PATCH: PR shlibs/11293: gdb is broken on Linux/i386 H.J. Lu
2010-02-17 20:29 ` Jan Kratochvil
@ 2010-02-17 20:33 ` Daniel Jacobowitz
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2010-02-17 20:33 UTC (permalink / raw)
To: H.J. Lu; +Cc: GDB
On Wed, Feb 17, 2010 at 12:10:31PM -0800, H.J. Lu wrote:
> - if (addr_bit < (sizeof (ULONGEST) * HOST_CHAR_BIT))
> + if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT))
> {
> CORE_ADDR space_size = (ULONGEST) 1 << addr_bit;
Please change this line also.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-02-17 20:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-17 20:10 PATCH: PR shlibs/11293: gdb is broken on Linux/i386 H.J. Lu
2010-02-17 20:29 ` Jan Kratochvil
2010-02-17 20:33 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox