bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 00/34] The rest of the x86_64-gnu port


From: Luca
Subject: Re: [RFC PATCH 00/34] The rest of the x86_64-gnu port
Date: Tue, 21 Mar 2023 13:20:08 +0100

Il 21/03/23 11:28, Sergey Bugaev ha scritto:
On Tue, Mar 21, 2023 at 12:48 PM Luca <luca@orpolo.org> wrote:
Great! if you still have issues with the long mode, you could try to
hack gnumach to wait at some point (e.g. user_bootstrap() or
setup_main()), attach with gdb and then continue. Either with some delay
or polling a flag that you flip from gdb once attached. In this way you
should be able to set a breakpoint in userspace.

OK, but how do I actually get the task to start / run? :D
I can't debug it if it's not run...

did you add $(task-resume) in the boot script?

With that instead of the prompt-version I see

--------------------------------8<--------------------------------
module 0: module-bootstrap-hello m1 ${host-port} ${device-port} $(task-create) $(task-resume)
1 multiboot modules
task loaded: module-bootstrap-hello m1 1 2

start module-bootstrap-hello: Unhandled exception caught by task module-bootstrap-hello(ffffffff9e7e6cd0), terminating
Dump of i386_saved_state ffffffff9e7db838:
EAX 00000000 EBX 00000001 ECX 00000004 EDX 00000000
ESI bfffee88 EDI 00000002 EBP 00515c40 ESP bfffee50
CS 001f SS 0017 DS 0017 ES 0017 FS 0017 GS 0017
v86:            DS 0000 ES 0000 FS 0000 GS 0000
EIP 00413ecb EFLAGS 00000246
trapno 14: Page fault, error 00000004
--------------------------------8<--------------------------------

which seems related to the signal setup:

--------------------------------8<--------------------------------
(gdb) b *0x00413ecb
Breakpoint 6 at 0x413ecb: file ../hurd/hurd/signal.h, line 169.
(gdb) c
Continuing.

Breakpoint 6, 0x0000000000413ecb in _hurd_self_sigstate () at ../hurd/hurd/signal.h:169
169     ../hurd/hurd/signal.h: File o directory non esistente.
1: x/i $pc
=> 0x413ecb <__sigprocmask+11>:        mov    %fs:0x88,%rbx
(gdb) bt
#0 0x0000000000413ecb in _hurd_self_sigstate () at ../hurd/hurd/signal.h:169 #1 __sigprocmask (how=how@entry=2, set=set@entry=0xbfffee88, oset=oset@entry=0x0)
    at ../sysdeps/mach/hurd/sigprocmask.c:37
#2  0x0000000000400645 in abort () at abort.c:64
#3 0x0000000000400586 in _dl_start () at ../sysdeps/mach/hurd/x86/init-first.c:267 #4 0x00000000004ae9f7 in __thread_set_state (target_thread=target_thread@entry=5,
    flavor=flavor@entry=7, new_state=new_state@entry=0xbfffff30,
    new_stateCnt=new_stateCnt@entry=4)
at /home/sergey/dev/crosshurd64/src/glibc/build/mach/RPC_thread_set_state.c:124 #5 0x000000000040c529 in _hurd_tls_new (tcb=0x514cc0 <__init1_tcbhead>, child=5)
    at ../sysdeps/mach/hurd/x86_64/tls.h:166
#6 _hurd_tls_init (tcb=0x514cc0 <__init1_tcbhead>) at ../sysdeps/mach/hurd/x86_64/tls.h:187
#7  first_init () at ../sysdeps/mach/hurd/x86/init-first.c:159
#8  _hurd_stack_setup () at ../sysdeps/mach/hurd/x86/init-first.c:223
#9 0x0000000000400915 in _start () at ../sysdeps/mach/hurd/x86_64/static-start.S:22
#10 0x0000000000000004 in ?? ()
#11 0x00000000bfffffd8 in ?? ()
#12 0x00000000bfffffef in ?? ()
#13 0x00000000bffffff2 in ?? ()
#14 0x00000000bffffff4 in ?? ()
#15 0x0000000000000000 in ?? ()
(gdb)
--------------------------------8<--------------------------------


Luca



reply via email to

[Prev in Thread] Current Thread [Next in Thread]