Re: [GSoC2013] question about "improve the GDB port for GNU Hurd"

陆岳
2013-05-01T12:26:16Z

Dear Thomas Schwinge:

so thanks for your reply!

I have already played something with Hurd. I run the Hurd under
kvm(thanks braunr who tell me use kvm instead of qemu). With the help
of IRC #hurd, I successfully build my GDB from source under Hurd.
Sadly say,even apply the patch in your email ,I got a lot of fails in
the gdb testcase.
there are about _605_ fails.
(something like below:)
FAIL: gdb.base/interrupt.exp: call function when asleep (wrong output)
FAIL: gdb.base/interrupt.exp: call function a second time
FAIL: gdb.base/interrupt.exp: Send Control-C, second time
FAIL: gdb.base/interrupt.exp: send end of file
FAIL: gdb.base/annota1.exp: run until main breakpoint (timeout)

In parallel, I tried to read the <The GNU Mach Reference Manual>,<The
Hurd Hacking Guide> and the GDB source code to figure out how GDB
works in Hurd and interacts with the Hurd system.
To my knowledge, the GDB in Hurd allocate the port in the
debugged-program to receive events,and set the inf->trace on. Later
GDB go into the gun_wait() to wait for something to happen in
debugged-program. And GDB use vm_write(),vm_read() to read and modify
debugged-program's memory.
But,I am still have some confuses about how the mach transport
message,how the virtual memory manage works.

I think the work of porting gdbserver is consist of three major components:
1. do the real work like operate the register,memory..(like set the
correct PC register,set breakpoint)
2. use the gdb protocol to communication with the GDB which run on
remote machine.
3. write document and do test

At final,I think I have the ability and the passion to finish the
porting of gdbserver to Hurd.
Since the Friday is the deadline to apply GSoC, I want to know
whether there is more work I need to do for the project "improve the
GDB Port for GNU Hurd". For instance solving some FAIL testcases.

thanks and best regards.

On Tue, Apr 30, 2013 at 5:13 PM, Thomas Schwinge
<thomas@codesourcery.com> wrote:
> Hi!
>
> On Tue, 30 Apr 2013 00:54:26 +0800, 陆岳 <hacklu.newborn@gmail.com> wrote:
>> I am interested in participating GsoC 2013 with GNU Hurd for improve
>> the GDB Port for GNU Hurd.
>
> Thanks for your interest!
>
>> Write this email I mainly to identify which work should I do in this
>> project. just Port gdbserver or something else?
>
> Well, as I said in the announcement email,
> <http://sourceware.org/ml/gdb/2013-04/msg00015.html>, and as reflected on
> the project idea page,
> <http://www.gnu.org/software/hurd/community/gsoc/project_ideas/gdb.html>,
> that is basically up for negotiation with the community, the mentor, and
> the student.
>
>> Last may I introduce myself, my name is Yue Lu who is a second-year
>> MS student in CS from Tongji University in China. I have worked as a
>> FTE in a company which produce embed-device.
>> What's plus, I had experience with linux kernel programming. And I
>> know GDB was use ptrace to commutate with linux kernel.
>> Sadly say, I have't enough knowledge about Hurd, but I have great
>> enthusiasm to learn that.
>
> Then I suggest you turn that enthusiasm into productivity ;-) -- install
> a GNU/Hurd system,
> <http://www.gnu.org/software/hurd/hurd/running/debian.html>, maybe start
> with a KVM/QEMU/VirtualBox image, and do a first run of the GDB testsuite
> (please locally apply the attached patch to disable some testcases that
> currently cause issues as described).
> <http://www.gnu.org/software/hurd/open_issues/gdb.html> can help with how
> to configure GDB, and so on. In parallel, please get an understanding
> how, roughly, the Hurd port of GDB works and interacts with the Hurd
> system.
>
> Of course, we're happy to help and answer specific questions.
>
>
> Grüße,
> Thomas
>
>

--
Yue Lu