Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* RE: gdbserver (was Re: parcelling up struct gdbarch)
@ 2001-07-16 23:37 Korbel, Michal
  0 siblings, 0 replies; 11+ messages in thread
From: Korbel, Michal @ 2001-07-16 23:37 UTC (permalink / raw)
  To: 'Daniel Jacobowitz', Fabrice Gautier; +Cc: Andrew Cagney, jtc, gdb

Hi,
In this week I plan create own version of GDBSERVER.
This version to be abble to debug thread apps only on linux-x86 (in the end
of year I plan create STRONG ARM support).
This version base on i386-stub from Quality Quorum and Michael Synder
qSymbol packet support.

Current status is:
	support thread packet (qC with reply QC, qP with reply qQ, qL with
reply QM),
	support Zbreak packet (software breakpoint),
	support P packet (write register),
	support Hg packet (set general thread).
	support Standard Responses
	support Mandatory Requests

How to use:
on target side call: gdbserver <connection> <program_to_debug>
<args_program_to_debug>
on host side call: gdb			# (gdb version with support qSymbol
packet - check remote.c file revision 1.55)
on gdb: target remote <connection>
on gdb: symbol <program_to_debug>
on gdb: break <break_description>	# (now we can insert own breakpoint)
on gdb: continue				# (now we can all we need)

I can switch to another thread and use step or next command,
but I have problem when try use continue all thread (plan finish today).
When I change support own version mywait funtion I hope will be better.

----------------------------------------------------------------------------
----------
Michal Korbel - Software engineer
Intel Technology Poland Sp. z o.o.; ul. Slowackiego 173; 80-298 Gdansk
tel. +48 58 34-81-726; fax: +48 58 34-81-505; mobile:+48 603-203-142 
----------------------------------------------------------------------------
----------

-----Original Message-----
From: Daniel Jacobowitz [ mailto:dmj+@andrew.cmu.edu ]
Sent: Tuesday, July 17, 2001 6:18 AM
To: Fabrice Gautier
Cc: Andrew Cagney; jtc@redback.com; gdb@sources.redhat.com
Subject: Re: gdbserver (was Re: parcelling up struct gdbarch)

On Tue, Jul 17, 2001 at 02:23:52AM +0200, Fabrice Gautier wrote:
> 
> On Mon, 16 Jul 2001 15:40:24 -0700
> Daniel Jacobowitz <dmj+@andrew.cmu.edu> wrote:
> 
> > More specifically, right now my attempt is to get any gdbserver working
> > in the exceedingly limited time frame before gdb 5.1 is released
> > without gdbserver support for the majority of targets.  I can't even
> > test many of the targets gdbserver claims support for, but I have some
> > severe doubts about when they last worked.  If we can hash out the
> > other portion of this thread, hopefully I can get at least Linux
> > working again.
> 
> Hi,
> 
> My personnal focus is to be abble to debug thread apps with gdbserver on
> linux-x86.
> 
> Fortunately for me, gdbserver still compile and works for linux-x86.

My understanding is that Michael Snyder has some bits to do this that
can not be released to the public.  Once I sort through making
gdbserver actually builds on the architectures I'm trying to support
(right now ARM, MIPS, PPC, x86, and soon Sparc and SH), if he still had
not been cleared to release them I was going to do it myself.  Of
course, if you beat me to it, I'll be thrilled :)

> So i've been in the (difficult) process of dissecting gdb to understand
> how that was supposed to be done and i've come down to three things to
> be done:
> 
> 1/ Make mywait in low-linux.c acts more or less like lin_lwp_wait does.
> 2/ Add support for thread query packet.
> 3/ Add thread information in T packets.

You'll also need the equivalent of proc_service.c in order to supply
enough information, I think, and possibly a little more work on the
qSymbol support for that (not sure if the gdbserver side of that
extension was really done/committed).

> In the current gdbserver, when a new pthread is created, gdbserver sends
> a T packet and the host gdb receive a SIGPWR signal. And i have to type
> c to continue.
> 
> I guess gdbserver must send a T packet when a trhead is created so that
> gdb knows about it, so im' wondering how to do so that gdb doesn't stop
> everytime a new thread is created ?

SIGPWR is because that happens to be 32 in the TARGET_SIGNAL_* enum. 
It's really receiving SIGRT0, which is used for the thread manager. 
gdbserver should be sending portable signal numbers, according to the
protocol, but currently does not.  It's on my list of things to fix if
no one beats me to it :)

Eventually GDB will acknowledge the SIGRT0 and then go update its
knowledge of the thread state.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: parcelling up struct gdbarch
@ 2001-07-16 15:30 Andrew Cagney
  2001-07-16 15:40 ` Daniel Jacobowitz
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Cagney @ 2001-07-16 15:30 UTC (permalink / raw)
  To: jtc; +Cc: Daniel Jacobowitz, gdb

> 
> Andrew> If GDBserver is going to be come more tightly integrated into GDB then
> Andrew> it is going to need to pick up some baggage like ui-file.
> 
> Can you explain your vision (or provide pointers to previous articles)
> of a tightly integrated gdbserver?


My, er ``vision'' is more focused on the target stack.

By tightly integrated I really mean, have gdbserver steal some of what 
GDB currently does.  For instance, imagine (this will take some 
imagination) a GDB with a cleanly implemented single step.

	WFI would tell the target to single step
	(WFI has been fixed to not know about
	h/w or s/w single step)

	the target, since it didn't know how to
	single step, would use software single step
	and tell the next target down to run.

	the remote.c target would get this and
	send it to the server.

	gdbserver would run/stop the target

If GDB and gdbserver share a common framework then it should be possible 
to push layers (such as single step) down into the remote server.

> I expect and accept some baggage,
> but at the moment I cannot comprehend why it would need high level
> constructs like ui-file.


If gdbserver is going to use more chunks of GDB then it and gdb will 
would probably want to start sharing certain bits of infrastructure - 
the event loop, the error output, serial.*

How much can/should be shared, I don't know.

 From what Daniel has said, I gather that his immediate focus is on 
getting a very thin gdbserver working.

	Andrew


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

end of thread, other threads:[~2001-07-17 11:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-16 23:37 gdbserver (was Re: parcelling up struct gdbarch) Korbel, Michal
  -- strict thread matches above, loose matches on Subject: below --
2001-07-16 15:30 parcelling up struct gdbarch Andrew Cagney
2001-07-16 15:40 ` Daniel Jacobowitz
2001-07-16 17:24   ` gdbserver (was Re: parcelling up struct gdbarch) Fabrice Gautier
2001-07-16 21:17     ` Daniel Jacobowitz
2001-07-16 22:22       ` Fabrice Gautier
2001-07-16 22:28         ` Daniel Jacobowitz
2001-07-17 10:00     ` Andrew Cagney
2001-07-17 10:11       ` Daniel Jacobowitz
2001-07-17 11:10         ` Andrew Cagney
2001-07-17 11:21           ` Daniel Jacobowitz
2001-07-17 11:46             ` Andrew Cagney
2001-07-17 10:36     ` Quality Quorum

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