Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
90 user(s) are online (74 user(s) are browsing Forums)

Members: 0
Guests: 90

more...

Support us!

Headlines

Report message:*
 

Re: GDB

Subject: Re: GDB
by billyfish on 2021/3/8 14:38:26

@kas1e


Added few printfs, and:

1). for first we never go inside of the for (current_target.beneath!= NULLt->beneathloop.
2). when we "fallback"inf is NULL too.


Ok here's what I've found so far. The inferior created by amigaos_create_inferior () is never added to the inferior list in inferior.c. If I add

add_inferior ((int) debug_data.current_process);


then it gets added to the list and

inf find_inferior_pid (pid);


on target.c:3249 now finds the inferior but it has aspace = NULL.

So add_inferior () isn't enough to get the aspace and pspace parts of the resulting inferior set up.

Changing the added code to

inf_p add_inferior_with_spaces ();

if (
inf_p)
  {
    
inf_p -> pid = (int) debug_data.current_process;
  }



seems a bit hacky but then gdb runs all the way through without crashing but not with its functionality all working.

Now add_inferior_with_spaces () adds a new address space rather than all of the gdb inferiors sharing a single address space which is because gdbarch_has_shared_address_space() returns 0.

So does OS4 have a shared address space? If so we can call set_gdbarch_has_shared_address_space() and may get further.
Otherwise we need to set up the inferior with the correct aspace, pspace values, etc.



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project