No subject


Fri Oct 2 13:19:05 CDT 2009


From: caz yokoyama <caz at calypso.caztech.com>

Date: Fri, 25 Jun 2010 07:45:52 -0700

Subject: [PATCH] Linux kernel does not support several commands. By this
modification, break-in to kernel, continue, and quit in gdb work.

---

gdb/remote.c | 8 ++++++++

1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/gdb/remote.c b/gdb/remote.c

index 35d517d..d5c31bf 100644

--- a/gdb/remote.c

+++ b/gdb/remote.c

@@ -9778,6 +9778,10 @@ remote_get_trace_status (struct trace_status *ts)

/* FIXME we need to get register block size some other way */

extern int trace_regblock_size;

+ /* Linux kernel does not support qTStatus */

+ if (interrupt_sequence_mode == interrupt_sequence_break_g)

+ return -1;

+

trace_regblock_size = get_remote_arch_state ()->sizeof_g_packet;

putpkt ("qTStatus");

@@ -10285,6 +10289,10 @@ remote_upload_trace_state_variables (struct
uploaded_tsv **utsvp)

struct remote_state *rs = get_remote_state ();

char *p;

+ /* Linux kernel does not support qTfV */

+ if (interrupt_sequence_mode == interrupt_sequence_break_g)

+ return -1;

+

/* Ask for a first packet of variable definition. */

putpkt ("qTfV");

getpkt (&rs->buf, &rs->buf_size, 0);

-- 

1.5.4.3


-caz
On Mon, Jun 28, 2010 at 7:26 AM, Matt W. Benjamin <matt at linuxbox.com> wrote:

> Hi,
>
> I've been trying out the kdb, kgdb integration on 2.6.35-rc3, and so far,
> kdb is useable but kgdb not.
>
> I have a slightly messy configuration, with virtualbox vm, host pipes, and
> a tcp pipe connector so that one vm monitors the other.  However, I seem to
> have no trouble using kdb at 115200.  When I try to use kgdb (and I also
> rebuilt the kernel with only kgdb enabled), gdb hangs, faults, etc.  The
> initial reported error is "warning: unrecognized item "timeout" in
> "qSupported" response."
>
> I'm guessing the problem could be the gdb--I'm using fedora 13's 7.1-26.
>  Can anyone make suggestions?
>
> Matt
>
> --
>
> Matt Benjamin
>
> The Linux Box
> 206 South Fifth Ave. Suite 150
> Ann Arbor, MI  48104
>
> http://linuxbox.com
>
> tel. 734-761-4689
> fax. 734-769-8938
> cel. 734-216-5309
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Kgdb-bugreport mailing list
> Kgdb-bugreport at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport
>



-- 
-caz, yokoyama at member.fsf.org, caz at caztech.com, 503-804-1028(m)

--00504502b18fc1b659048a18d7eb
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div>I recognized this problem and have a patch. It was caused by introduct=
ion of new commands between gdb and gdbserver which Linux kernel does not s=
upport. Here is the patch.</div>
<div><span lang=3D"EN">
<p>From c8f99189be0bb84ecdb5657346cddc3a20e0d6bf Mon Sep 17 00:00:00 2001</=
p>
<p>From: caz yokoyama &lt;<a href=3D"mailto:caz at calypso.caztech.com">caz at ca=
lypso.caztech.com</a>&gt;</p>
<p>Date: Fri, 25 Jun 2010 07:45:52 -0700</p>
<p>Subject: [PATCH] Linux kernel does not support several commands. By this=
 modification, break-in to kernel, continue, and quit in gdb work.</p>
<p>---</p>
<p>gdb/remote.c | 8 ++++++++</p>
<p>1 files changed, 8 insertions(+), 0 deletions(-)</p>
<p>diff --git a/gdb/remote.c b/gdb/remote.c</p>
<p>index 35d517d..d5c31bf 100644</p>
<p>--- a/gdb/remote.c</p>
<p>+++ b/gdb/remote.c</p>
<p>@@ -9778,6 +9778,10 @@ remote_get_trace_status (struct trace_status *ts)=
</p>
<p>/* FIXME we need to get register block size some other way */</p>
<p>extern int trace_regblock_size;</p>
<p></p>
<p>+ /* Linux kernel does not support qTStatus */</p>
<p>+ if (interrupt_sequence_mode =3D=3D interrupt_sequence_break_g)</p>
<p>+ return -1;</p>
<p>+</p>
<p>trace_regblock_size =3D get_remote_arch_state ()-&gt;sizeof_g_packet;</p=
>
<p></p>
<p>putpkt (&quot;qTStatus&quot;);</p>
<p>@@ -10285,6 +10289,10 @@ remote_upload_trace_state_variables (struct upl=
oaded_tsv **utsvp)</p>
<p>struct remote_state *rs =3D get_remote_state ();</p>
<p>char *p;</p>
<p></p>
<p>+ /* Linux kernel does not support qTfV */</p>
<p>+ if (interrupt_sequence_mode =3D=3D interrupt_sequence_break_g)</p>
<p>+ return -1;</p>
<p>+</p>
<p>/* Ask for a first packet of variable definition. */</p>
<p>putpkt (&quot;qTfV&quot;);</p>
<p>getpkt (&amp;rs-&gt;buf, &amp;rs-&gt;buf_size, 0);</p>
<p>-- </p>
<p>1.5.4.3</p>
<p>=E3=80=80</p></span><br>-caz<br></div>
<div class=3D"gmail_quote">On Mon, Jun 28, 2010 at 7:26 AM, Matt W. Benjami=
n <span dir=3D"ltr">&lt;<a href=3D"mailto:matt at linuxbox.com">matt at linuxbox.=
com</a>&gt;</span> wrote:<br>
<blockquote style=3D"BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex=
; PADDING-LEFT: 1ex" class=3D"gmail_quote">Hi,<br><br>I&#39;ve been trying =
out the kdb, kgdb integration on 2.6.35-rc3, and so far, kdb is useable but=
 kgdb not.<br>
<br>I have a slightly messy configuration, with virtualbox vm, host pipes, =
and a tcp pipe connector so that one vm monitors the other. =C2=A0However, =
I seem to have no trouble using kdb at 115200. =C2=A0When I try to use kgdb=
 (and I also rebuilt the kernel with only kgdb enabled), gdb hangs, faults,=
 etc. =C2=A0The initial reported error is &quot;warning: unrecognized item =
&quot;timeout&quot; in &quot;qSupported&quot; response.&quot;<br>
<br>I&#39;m guessing the problem could be the gdb--I&#39;m using fedora 13&=
#39;s 7.1-26. =C2=A0Can anyone make suggestions?<br><br>Matt<br><br>--<br><=
br>Matt Benjamin<br><br>The Linux Box<br>206 South Fifth Ave. Suite 150<br>=
Ann Arbor, MI =C2=A048104<br>
<br><a href=3D"http://linuxbox.com/" target=3D"_blank">http://linuxbox.com<=
/a><br><br>tel. 734-761-4689<br>fax. 734-769-8938<br>cel. 734-216-5309<br><=
br>------------------------------------------------------------------------=
------<br>
This SF.net email is sponsored by Sprint<br>What will you do first with EVO=
, the first 4G phone?<br>Visit <a href=3D"http://sprint.com/first" target=
=3D"_blank">sprint.com/first</a> -- <a href=3D"http://p.sf.net/sfu/sprint-c=
om-first" target=3D"_blank">http://p.sf.net/sfu/sprint-com-first</a><br>
_______________________________________________<br>Kgdb-bugreport mailing l=
ist<br><a href=3D"mailto:Kgdb-bugreport at lists.sourceforge.net">Kgdb-bugrepo=
rt at lists.sourceforge.net</a><br><a href=3D"https://lists.sourceforge.net/li=
sts/listinfo/kgdb-bugreport" target=3D"_blank">https://lists.sourceforge.ne=
t/lists/listinfo/kgdb-bugreport</a><br>
</blockquote></div><br><br clear=3D"all"><br>-- <br>-caz, <a href=3D"mailto=
:yokoyama at member.fsf.org">yokoyama at member.fsf.org</a>, <a href=3D"mailto:ca=
z at caztech.com">caz at caztech.com</a>, 503-804-1028(m)<br><br>

--00504502b18fc1b659048a18d7eb--
--00504502b18fc1b662048a18d7ed
Content-Type: application/octet-stream; 
	name="0001-Linux-kernel-does-not-support-several-commands.-By-t.patch"
Content-Disposition: attachment; 
	filename="0001-Linux-kernel-does-not-support-several-commands.-By-t.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_gazgulgz0

RnJvbSBjOGY5OTE4OWJlMGJiODRlY2RiNTY1NzM0NmNkZGMzYTIwZTBkNmJmIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBjYXogeW9rb3lhbWEgPGNhekBjYWx5cHNvLmNhenRlY2guY29t
PgpEYXRlOiBGcmksIDI1IEp1biAyMDEwIDA3OjQ1OjUyIC0wNzAwClN1YmplY3Q6IFtQQVRDSF0g
TGludXgga2VybmVsIGRvZXMgbm90IHN1cHBvcnQgc2V2ZXJhbCBjb21tYW5kcy4gQnkgdGhpcyBt
b2RpZmljYXRpb24sIGJyZWFrLWluIHRvIGtlcm5lbCwgY29udGludWUsIGFuZCBxdWl0IG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