public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] gdb'ing 32-bit executable on IA64
@ 2002-10-30 14:58 Sane_Purushottam
  2002-10-30 15:14 ` Don Dugger
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Sane_Purushottam @ 2002-10-30 14:58 UTC (permalink / raw)
  To: linux-ia64

When I try to run a 32-bit executable in gdb on a IA-64 linux (RH 7.2), I
can set the breakpoint fine but when I try to run it, I get an error "Can't
insert breakpoint for slot numbers greater than 2"

What's the solution ??

Nitin Sane
sane_purushottam@emc.com
(508) 382-7319



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

* Re: [Linux-ia64] gdb'ing 32-bit executable on IA64
  2002-10-30 14:58 [Linux-ia64] gdb'ing 32-bit executable on IA64 Sane_Purushottam
@ 2002-10-30 15:14 ` Don Dugger
  2002-11-11 19:05 ` Don Dugger
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Don Dugger @ 2002-10-30 15:14 UTC (permalink / raw)
  To: linux-ia64

Nitin-

Use an IA32 `gdb'.  The standard `gdb' on IA64 machines only deals with
IA64 processes.  All you have to do is copy `gdb' over from an IA32
machine and then use that to debug your IA32 processes.

On Wed, Oct 30, 2002 at 09:58:05AM -0500, Sane_Purushottam@emc.com wrote:
> When I try to run a 32-bit executable in gdb on a IA-64 linux (RH 7.2), I
> can set the breakpoint fine but when I try to run it, I get an error "Can't
> insert breakpoint for slot numbers greater than 2"
> 
> What's the solution ??
> 
> Nitin Sane
> sane_purushottam@emc.com
> (508) 382-7319
> 
> 
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64

-- 
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
n0ano@n0ano.com


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

* Re: [Linux-ia64] gdb'ing 32-bit executable on IA64
  2002-10-30 14:58 [Linux-ia64] gdb'ing 32-bit executable on IA64 Sane_Purushottam
  2002-10-30 15:14 ` Don Dugger
@ 2002-11-11 19:05 ` Don Dugger
  2002-11-11 19:16 ` Don Dugger
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Don Dugger @ 2002-11-11 19:05 UTC (permalink / raw)
  To: linux-ia64

Nitin-

I just remembered, there's one more gotcha you have to deal with
to run `gdb' on IA32 processes.  `gdb' uses the shell to actually
execute the target program and, by default, it winds up using
the IA64 version of the shell.  This doesn't work.

What you have to do is spcify an IA32 shell through the `SHELL'
environment variable when using the IA32 `gdb'.  If all of the
IA32 programs are in the directory `/usr/ia32/bin' then the
following sommand should work:

	SHELL=/usr/ia32/bin/sh /usr/ia32/bin/gdb $*

On Wed, Oct 30, 2002 at 08:14:22AM -0700, Don Dugger wrote:
> Nitin-
> 
> Use an IA32 `gdb'.  The standard `gdb' on IA64 machines only deals with
> IA64 processes.  All you have to do is copy `gdb' over from an IA32
> machine and then use that to debug your IA32 processes.
> 
> On Wed, Oct 30, 2002 at 09:58:05AM -0500, Sane_Purushottam@emc.com wrote:
> > When I try to run a 32-bit executable in gdb on a IA-64 linux (RH 7.2), I
> > can set the breakpoint fine but when I try to run it, I get an error "Can't
> > insert breakpoint for slot numbers greater than 2"
> > 
> > What's the solution ??
> > 
> > Nitin Sane
> > sane_purushottam@emc.com
> > (508) 382-7319
> > 
> > 
> > _______________________________________________
> > Linux-IA64 mailing list
> > Linux-IA64@linuxia64.org
> > http://lists.linuxia64.org/lists/listinfo/linux-ia64
> 
> -- 
> Don Dugger
> "Censeo Toto nos in Kansa esse decisse." - D. Gale
> n0ano@n0ano.com
> 
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64

-- 
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
n0ano@n0ano.com


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

* Re: [Linux-ia64] gdb'ing 32-bit executable on IA64
  2002-10-30 14:58 [Linux-ia64] gdb'ing 32-bit executable on IA64 Sane_Purushottam
  2002-10-30 15:14 ` Don Dugger
  2002-11-11 19:05 ` Don Dugger
@ 2002-11-11 19:16 ` Don Dugger
  2002-11-11 19:24 ` David Mosberger
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Don Dugger @ 2002-11-11 19:16 UTC (permalink / raw)
  To: linux-ia64

David-

Maybe.  I used the shell variable long before we had the IA32
working as seamlessly as it does today.  I'll give this a try
tonight and let you know what happens.

On Mon, Nov 11, 2002 at 11:24:49AM -0800, David Mosberger wrote:
> >>>>> On Mon, 11 Nov 2002 12:05:27 -0700, Don Dugger <n0ano@n0ano.com> said:
> 
>   Don> Nitin- I just remembered, there's one more gotcha you have to
>   Don> deal with to run `gdb' on IA32 processes.  `gdb' uses the shell
>   Don> to actually execute the target program and, by default, it
>   Don> winds up using the IA64 version of the shell.  This doesn't
>   Don> work.
> 
>   Don> What you have to do is spcify an IA32 shell through the `SHELL'
>   Don> environment variable when using the IA32 `gdb'.  If all of the
>   Don> IA32 programs are in the directory `/usr/ia32/bin' then the
>   Don> following sommand should work:
> 
>   Don> 	SHELL=/usr/ia32/bin/sh /usr/ia32/bin/gdb $*
> 
> Wouldn't it be much easier to copy the x86 version of bash into
> 
> 	/emul/ia32-linux/bin/sh
> 
> ?
> 
> 	--david

-- 
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
n0ano@n0ano.com


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

* Re: [Linux-ia64] gdb'ing 32-bit executable on IA64
  2002-10-30 14:58 [Linux-ia64] gdb'ing 32-bit executable on IA64 Sane_Purushottam
                   ` (2 preceding siblings ...)
  2002-11-11 19:16 ` Don Dugger
@ 2002-11-11 19:24 ` David Mosberger
  2002-11-12 17:34 ` Don Dugger
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: David Mosberger @ 2002-11-11 19:24 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Mon, 11 Nov 2002 12:05:27 -0700, Don Dugger <n0ano@n0ano.com> said:

  Don> Nitin- I just remembered, there's one more gotcha you have to
  Don> deal with to run `gdb' on IA32 processes.  `gdb' uses the shell
  Don> to actually execute the target program and, by default, it
  Don> winds up using the IA64 version of the shell.  This doesn't
  Don> work.

  Don> What you have to do is spcify an IA32 shell through the `SHELL'
  Don> environment variable when using the IA32 `gdb'.  If all of the
  Don> IA32 programs are in the directory `/usr/ia32/bin' then the
  Don> following sommand should work:

  Don> 	SHELL=/usr/ia32/bin/sh /usr/ia32/bin/gdb $*

Wouldn't it be much easier to copy the x86 version of bash into

	/emul/ia32-linux/bin/sh

?

	--david


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

* Re: [Linux-ia64] gdb'ing 32-bit executable on IA64
  2002-10-30 14:58 [Linux-ia64] gdb'ing 32-bit executable on IA64 Sane_Purushottam
                   ` (3 preceding siblings ...)
  2002-11-11 19:24 ` David Mosberger
@ 2002-11-12 17:34 ` Don Dugger
  2002-11-12 18:23 ` David Mosberger
  2002-11-12 20:19 ` Don Dugger
  6 siblings, 0 replies; 8+ messages in thread
From: Don Dugger @ 2002-11-12 17:34 UTC (permalink / raw)
  To: linux-ia64

David-

Nope, that didn't work.  I'm running a 2.4.18 kernel, the
EMUL_PREFIX_LINUX_IA32 is set to `emul/ia32-linux/', I put the
IA32 version of `sh' into `/emul/ia32-linux/bin/sh' and the
IA32 `gdb' didn't work.  Do you think this is something we need
to worry about or is it just a quirk of `gdb'?

On Mon, Nov 11, 2002 at 11:24:49AM -0800, David Mosberger wrote:
> >>>>> On Mon, 11 Nov 2002 12:05:27 -0700, Don Dugger <n0ano@n0ano.com> said:
> 
>   Don> Nitin- I just remembered, there's one more gotcha you have to
>   Don> deal with to run `gdb' on IA32 processes.  `gdb' uses the shell
>   Don> to actually execute the target program and, by default, it
>   Don> winds up using the IA64 version of the shell.  This doesn't
>   Don> work.
> 
>   Don> What you have to do is spcify an IA32 shell through the `SHELL'
>   Don> environment variable when using the IA32 `gdb'.  If all of the
>   Don> IA32 programs are in the directory `/usr/ia32/bin' then the
>   Don> following sommand should work:
> 
>   Don> 	SHELL=/usr/ia32/bin/sh /usr/ia32/bin/gdb $*
> 
> Wouldn't it be much easier to copy the x86 version of bash into
> 
> 	/emul/ia32-linux/bin/sh
> 
> ?
> 
> 	--david

-- 
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
n0ano@n0ano.com


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

* Re: [Linux-ia64] gdb'ing 32-bit executable on IA64
  2002-10-30 14:58 [Linux-ia64] gdb'ing 32-bit executable on IA64 Sane_Purushottam
                   ` (4 preceding siblings ...)
  2002-11-12 17:34 ` Don Dugger
@ 2002-11-12 18:23 ` David Mosberger
  2002-11-12 20:19 ` Don Dugger
  6 siblings, 0 replies; 8+ messages in thread
From: David Mosberger @ 2002-11-12 18:23 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Tue, 12 Nov 2002 10:34:46 -0700, Don Dugger <n0ano@n0ano.com> said:

  Don> David- Nope, that didn't work.  I'm running a 2.4.18 kernel,
  Don> the EMUL_PREFIX_LINUX_IA32 is set to `emul/ia32-linux/', I put
  Don> the IA32 version of `sh' into `/emul/ia32-linux/bin/sh' and the
  Don> IA32 `gdb' didn't work.  Do you think this is something we need
  Don> to worry about or is it just a quirk of `gdb'?

Hmmh, to be honest, I always have used gdb.x86 without doing anything
special about the shell and it always worked for me.  Perhaps we're
using different gdb versions or we're doing something differently?  I
seem to be using "gdb 5.0rh-5" from x86 Red Hat 7.1.

	--david


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

* Re: [Linux-ia64] gdb'ing 32-bit executable on IA64
  2002-10-30 14:58 [Linux-ia64] gdb'ing 32-bit executable on IA64 Sane_Purushottam
                   ` (5 preceding siblings ...)
  2002-11-12 18:23 ` David Mosberger
@ 2002-11-12 20:19 ` Don Dugger
  6 siblings, 0 replies; 8+ messages in thread
From: Don Dugger @ 2002-11-12 20:19 UTC (permalink / raw)
  To: linux-ia64

David-

Duh, cockpit error on my part.  Turns out I run with SHELL set to
`/bin/bash'.  I copied the IA32 version of `bash' to the `emul'
directory and everything works just fine.

On Tue, Nov 12, 2002 at 10:23:21AM -0800, David Mosberger wrote:
> >>>>> On Tue, 12 Nov 2002 10:34:46 -0700, Don Dugger <n0ano@n0ano.com> said:
> 
>   Don> David- Nope, that didn't work.  I'm running a 2.4.18 kernel,
>   Don> the EMUL_PREFIX_LINUX_IA32 is set to `emul/ia32-linux/', I put
>   Don> the IA32 version of `sh' into `/emul/ia32-linux/bin/sh' and the
>   Don> IA32 `gdb' didn't work.  Do you think this is something we need
>   Don> to worry about or is it just a quirk of `gdb'?
> 
> Hmmh, to be honest, I always have used gdb.x86 without doing anything
> special about the shell and it always worked for me.  Perhaps we're
> using different gdb versions or we're doing something differently?  I
> seem to be using "gdb 5.0rh-5" from x86 Red Hat 7.1.
> 
> 	--david

-- 
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
n0ano@n0ano.com


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

end of thread, other threads:[~2002-11-12 20:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-30 14:58 [Linux-ia64] gdb'ing 32-bit executable on IA64 Sane_Purushottam
2002-10-30 15:14 ` Don Dugger
2002-11-11 19:05 ` Don Dugger
2002-11-11 19:16 ` Don Dugger
2002-11-11 19:24 ` David Mosberger
2002-11-12 17:34 ` Don Dugger
2002-11-12 18:23 ` David Mosberger
2002-11-12 20:19 ` Don Dugger

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