Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Bug in mips:3900 arch ?
@ 2008-01-28 15:48 Markus Deuling
  2008-01-31 22:35 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Deuling @ 2008-01-28 15:48 UTC (permalink / raw)
  To: GDB Patches

Hi,

I'm currently writing a little helper script a la gdb_mbuild.sh to cover the new "--enable-targets-all" 
flag and I think I found a bug.

This GDB was configured as "i686-pc-linux-gnu".
(gdb) set architecture mips:3900
/home/deuling/gdb/dev/gdb/mips-linux-tdep.c:1152: internal-error: can't handle ABI
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) 

"mips:3900" is one of the possible target architectures given by GDB when invoking "set architecture" without a parameter.
Shouldn't this work? For my opinion it should always be possible to switch to one of these archs without crashing.

Regards,
Markus

-- 
  Markus Deuling
  GNU Toolchain for Linux on Cell BE
  deuling@de.ibm.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug in mips:3900 arch ?
  2008-01-28 15:48 Bug in mips:3900 arch ? Markus Deuling
@ 2008-01-31 22:35 ` Daniel Jacobowitz
  2008-02-14  6:14   ` Markus Deuling
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2008-01-31 22:35 UTC (permalink / raw)
  To: Markus Deuling; +Cc: GDB Patches

On Mon, Jan 28, 2008 at 03:46:02PM +0100, Markus Deuling wrote:
> Hi,
>
> I'm currently writing a little helper script a la gdb_mbuild.sh to cover 
> the new "--enable-targets-all" flag and I think I found a bug.
>
> This GDB was configured as "i686-pc-linux-gnu".
> (gdb) set architecture mips:3900
> /home/deuling/gdb/dev/gdb/mips-linux-tdep.c:1152: internal-error: can't handle ABI
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session? (y or n) 
>
> "mips:3900" is one of the possible target architectures given by GDB when invoking "set architecture" without a parameter.
> Shouldn't this work? For my opinion it should always be possible to switch to one of these archs without crashing.

Yes, this looks like a bug.  It is caused by the special case in
mips_gdbarch_init, by the comment:

  /* Try the architecture for any hint of the correct ABI.  */

I think replacing the internal error by "return" or "break" would be
safe.  No real Linux application will ever have the EABI32 or EABI64
ABIs.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug in mips:3900 arch ?
  2008-01-31 22:35 ` Daniel Jacobowitz
@ 2008-02-14  6:14   ` Markus Deuling
  2008-02-14 17:12     ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Deuling @ 2008-02-14  6:14 UTC (permalink / raw)
  To: Daniel Jacobowitz, GDB Patches

[-- Attachment #1: Type: text/plain, Size: 843 bytes --]

Hi Daniel,

Daniel Jacobowitz schrieb:
> On Mon, Jan 28, 2008 at 03:46:02PM +0100, Markus Deuling wrote:
 > Yes, this looks like a bug.  It is caused by the special case in
> mips_gdbarch_init, by the comment:
> 
>   /* Try the architecture for any hint of the correct ABI.  */
> 
> I think replacing the internal error by "return" or "break" would be
> safe.  No real Linux application will ever have the EABI32 or EABI64
> ABIs.

sorry for the late response. This patch simply removes the internal error. Maybe it would be a
good idea to add a warning instead? But as you say no Linux application will ever run into this
so the warning might be unnecessary.

Is this patch ok? 

ChangeLog:

	* mips-linux-tdep.c (mips_linux_init_abi): Remove internal error.



-- 
  Markus Deuling
  GNU Toolchain for Linux on Cell BE
  deuling@de.ibm.com


[-- Attachment #2: fix-mips --]
[-- Type: text/plain, Size: 434 bytes --]

diff -urpN src/gdb/mips-linux-tdep.c dev/gdb/mips-linux-tdep.c
--- src/gdb/mips-linux-tdep.c	2008-01-01 23:53:12.000000000 +0100
+++ dev/gdb/mips-linux-tdep.c	2008-02-14 06:54:39.000000000 +0100
@@ -1149,7 +1149,6 @@ mips_linux_init_abi (struct gdbarch_info
 	tramp_frame_prepend_unwinder (gdbarch, &mips_linux_n64_rt_sigframe);
 	break;
       default:
-	internal_error (__FILE__, __LINE__, _("can't handle ABI"));
 	break;
     }
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug in mips:3900 arch ?
  2008-02-14  6:14   ` Markus Deuling
@ 2008-02-14 17:12     ` Daniel Jacobowitz
  2008-02-15  4:52       ` Markus Deuling
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2008-02-14 17:12 UTC (permalink / raw)
  To: Markus Deuling; +Cc: GDB Patches

On Thu, Feb 14, 2008 at 07:11:42AM +0100, Markus Deuling wrote:
> 	* mips-linux-tdep.c (mips_linux_init_abi): Remove internal error.

OK.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Bug in mips:3900 arch ?
  2008-02-14 17:12     ` Daniel Jacobowitz
@ 2008-02-15  4:52       ` Markus Deuling
  0 siblings, 0 replies; 5+ messages in thread
From: Markus Deuling @ 2008-02-15  4:52 UTC (permalink / raw)
  To: GDB Patches; +Cc: Daniel Jacobowitz

Daniel Jacobowitz schrieb:
> On Thu, Feb 14, 2008 at 07:11:42AM +0100, Markus Deuling wrote:
>> 	* mips-linux-tdep.c (mips_linux_init_abi): Remove internal error.
> 
> OK.
> 

Committed this one. Thank you!

Regards,
Markus

-- 
  Markus Deuling
  GNU Toolchain for Linux on Cell BE
  deuling@de.ibm.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-15  4:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-28 15:48 Bug in mips:3900 arch ? Markus Deuling
2008-01-31 22:35 ` Daniel Jacobowitz
2008-02-14  6:14   ` Markus Deuling
2008-02-14 17:12     ` Daniel Jacobowitz
2008-02-15  4:52       ` Markus Deuling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox