Skip to contentSkip to conversation

]

Fwd: BOUNCE [email protected]: Non-member submission from Nancy Bigham 1 participant 1 message May 16, 2000 MIPS

lore
Share & tools
lore
#0 lore raw

-------- Original Message --------
Subject: BOUNCE [email protected]: Non-member submission from
[Jun Sun <[email protected]>]
Date: Tue, 16 May 2000 10:49:56 -0700 (PDT)
From: owner-linux@cthulhu
To: owner-linux@cthulhu

From owner-linux Tue May 16 10:49:55 2000
Received: from sgi.com (sgi.engr.sgi.com [192.26.80.37])

	by cthulhu.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF)
	via ESMTP id KAA52215
	for <[email protected]>;
	Tue, 16 May 2000 10:49:54 -0700 (PDT)
	mail_from ([email protected])

Received: from hermes.mvista.com (gateway.mvista.com [63.192.220.206])
by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam:
SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.)
via ESMTP id KAA06183
for <[email protected]>; Tue, 16 May 2000 10:49:52 -0700 (PDT) mail_from ([email protected])
Received: from mvista.com (IDENT:[email protected] [10.0.0.75])

	by hermes.mvista.com (8.9.3/8.9.3) with ESMTP id KAA22202;
	Tue, 16 May 2000 10:49:43 -0700

Sender: [email protected]
Message-ID: <[email protected]>
Date: Tue, 16 May 2000 10:49:08 -0700
From: Jun Sun <[email protected]>
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20b i586)
X-Accept-Language: en
MIME-Version: 1.0
To: Ralf Baechle <[email protected]>
CC: [email protected], [email protected], [email protected]
Subject: Re: HELP : ptrace returns puzzling results
References: <[email protected]> <[email protected]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Quoted 11 lines · Ralf Baechle
Quoted 4 lines · Jun Sun

I am writing a gdbserver for linux/mips. The server can now talk with the gdb client, and can run to completion if you press 'c'.

reg #29 ($29,sp) = 2147483120 (0x7ffffdf0)

The value of sp looks sane, it a value near the absolute top of the stack at 0x80000000.

Quoted 9 lines
Quoted 1 line

reg #37 ($64,pc) = 263607008 (0x0fb652e0)

Also looks sane at first look, this value is in the typical address range where the dynamic linker gets mapped.

Many of the registers in the dump you gave have a value of zero and that is worrying me much more. All the caller saved registers are zero, that smells.

I looked at the problem again. The registers are actually correct. Most registers are zero becase that is the program start up time (in exec()). I now can set a breakpoint and run until that breakpoint.

However, step or next or setting another breakpoint do not work. It appears that gdbserver calls ptrace with PTRACE_SINGLESTEP option, which is not implemented in the kernel I am using (it is v2.3.99-pre3). Is this implemented in the latest version? If not, is it difficult to add one? Or can we get around without it?

Jun