Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

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

Members: 0
Guests: 90

more...

Support us!

Headlines




« 1 2 3 4 (5) 6 7 8 »


Re: GDB
Just popping in
Joined:
2011/7/20 20:01
From In the sticks
Posts: 172
@salass00

I'll dig through the code to find out where the file is opened and let you know tomorrow. Given that the code used was real_fseek in bfdio.c, I'd guess that some printfs to lines 121-124 in that file will show which one was called or checking for where HAVE_FOPEN64 is defined. I can checkout the branch before we fixed it tomorrow and let you know if that's ok.

   Report Go to top

Re: GDB
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1800
@billyfish

You should be able to check with "if (fp->_flags & __SL64)" whether the file is 64-bit enabled, just to see if that is the cause of the problem or not.

   Report Go to top

Re: GDB
Home away from home
Joined:
2006/11/26 21:45
From a dying planet
Posts: 4089
@salass00

Will (or is) gdb be able to also genug shared builds?
Will it be possible to trace those shared build crashes in scummvm?

_________________
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
   Report Go to top

Re: GDB
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7020
@Raziel
Asking the wrong one again ?:)

Quote:

Will (or is) gdb be able to also genug shared builds?


If you ask if the current GDB from SDK is able to debug binaries that use sobjs: it can probabaly in some sort (there were some sobjs related code in the old GDB for sure), but all newer gcc produce dwarf4 debug binaries which old GDB can't handle, so even if it can, you probably will be out of luck, because either scummvm or one of the link libs surely builds with newer GCC (meaning GDB will say "sorry, dwarf4 support, can handle only dwarf2).

As for "will new version support it": If you will read the whole thread (boring, yes), you will see that we currently disable sobjs, because at first, we need to make a new version that works everywhere as expected with the usual apps, and then make it works on x5000 too. And only when everything will be good, and if there nothing left to fix, and if there will be wish from any developer to deal with, then sobjs support can be added probably.

But better don't hold the hope for. Sobjs on amigaos4 known to be sucking crap and I are sure once someone will start to dig in to make proper support of it in GDB, he will meet with all sort of limitations, shortcomings and unimplemented features which can't be a workaround.

Quote:

Will it be possible to trace those shared build crashes in scummvm?


We even didn't have a proper debugger to debug plain binaries, taking aside that custom-hack-support of sobjs we had in os4.

And, to add, GDB will not offer you a lot in comparison with stack trace from GR if you didn't know assembly code. In GDB you surely can do a lot of things, but they in no way mean "now you will know why it crashes exactly, only because you run binary inside of GDB".

GDB is good for many other things as well, like, for example, you run a program, and it NOT_CRASHED but reacts wrong and you don't know why. So you can break executions, and see stack, registers, memory, etc, etc. It's more like a tool for developers, to help them.

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: GDB
Home away from home
Joined:
2006/11/26 21:45
From a dying planet
Posts: 4089
@kas1e

Thank you, yes missed changing the @

_________________
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
   Report Go to top

Re: GDB
Just popping in
Joined:
2011/7/20 20:01
From In the sticks
Posts: 172
kas1e described it well, I'd just add a couple of extra things. With gdb you can set breakpoints at any point in a program which will halt the program at that point so you can inspect variables, etc and can step through the program line by line. It will also allow you to check c variables and even call functions to check their results within gdb itself. It makes development so much easier!

   Report Go to top

Re: GDB
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7020
@billyfish
Quote:

I'll have another look at the code tomorrow and we can try and work out how to get the exec part sorted


I checked morphos' GDB 8.3 port, and they surely didn't have anything modified in exec.c. Through exec.c of GDB8.x changed pretty much and didn't contain anymore those functions which 6.3 or 7.5.1 still has. See how it were done in 6.3 one:
https://sourceforge.net/p/adtools/code ... tree/trunk/gdb/gdb/exec.c (check for amigaos4 ifdefs)


As a side note, I build GDB with support of ncurses (use PDCurses, which is an alternative but with SDL2 implementation), so we can run gdb over "TUI", like "gdb -tui" and:

(click open in new tab for full-size):
Resized Image

Through crashes in rl_dispatch_subseq() once it tried to operate with.


Edited by kas1e on 2021/2/25 13:13:48
_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: GDB
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7020
@All

So, while we think if it better or not to attach/close the file via hooks inside of exec.c as it was done in our old gdb 6.3a, I made it the same, together with enabling debug output and with enabling debug gdb/target.c in both, our old gdb 6.3a and new 7.5.1 to compare what we should have and what we have. So, there results:

GDB 6.3.a

That our current SDK version, and when we run this gdb over test binary, doing a list, then set a breakpoint and type "run", that what we have in the console with enabled debug in a target.c:

3/0.Work:aagdb_6_3a_clib2 test_dwarf2 
GNU gdb 6.3 
(AmigaOS build 20050719)
Copyright 2004 Free Software FoundationInc.
GDB is free softwarecovered by the GNU General Public License, and you are
welcome to change it 
and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "ppc-amigaos"...
(
gdb) list
list
target_xfer_memory (0x7fd4944cxxx4readxxx) = 0
1    
#include <stdio.h>
2    int main()
3    {
4    printf("asdfn");
5    }
(
gdb) break 1
break 1
Breakpoint 1 at 0x7fd4944c
file test.cline 1.
(gdbr
r
Starting program
Work:aa/test_dwarf2 
target_xfer_memory 
(0x7fd4944cxxx4readxxx) = 4bytes 94 21 ff f0
target_xfer_memory 
(0x7fd4944cxxx4writexxx) = 4bytes 7d 82 10 08
target_insert_breakpoint 
(0x7fd4944cxxx) = 0
target_fetch_registers 
(pc) = 00000000 0x0 0
target_terminal_inferior 
()
target_resume (-1, continue, 0)
target_wait (-1status) = 1653873664,   status->kind stoppedsignal SIGBUS
target_fetch_registers 
(pc) = 023aecf0 0x23aecf0 37416176
target_terminal_ours_for_output 
()

Program received signal SIGBUSBus error.
target_xfer_memory (0x7fd4944cxxx4writexxx) = 4bytes 94 21 ff f0
target_remove_breakpoint 
(0x7fd4944cxxx) = 0
target_terminal_ours 
()
target_fetch_registers (r1) = 02249f90 0x2249f90 35954576
0x023aecf0 in 
?? ()
target_create_inferior (Work:aa/test_dwarf2, , xxx1)
(
gdb)


That Sigbus error with 0x023aecf0 in ?? () there mean not a deal for us (that x5000 issue we had to deal with).


GDB 7.5.1

Now, that what we have when we doing the same (enable debug in gdb/target.c, add attaching a file via a hook in exec.c, etc). There is the console output:

10/0.Work:aagdb_751 test
GNU gdb 
(GDB7.5.1
Copyright 
(C2012 Free Software FoundationInc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free softwareyou are free to change and redistribute it.
There is NO WARRANTYto the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "ppc-amigaos".
For 
bug reporting instructionsplease see:
<
http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /Work/aa/test...done.
(
gdb) list
list
target_memory_map ()
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0x626624880x00x10004d44) = 4bytes 3d 20 01 00
target_get_section_table 
()
exec:target_xfer_partial (2, (null), 0x626625580x00x10004d44) = 4bytes 3d 20 01 00
1    
#include <stdio.h>
2    int main()
3    {
4    printf("asdfn");
5    }
(
gdb) break 1
break 1
target_get_section_table 
()
exec:target_xfer_partial (2, (null), 0x626624580x00x10004d44) = 4bytes 3d 20 01 00
target_get_section_table 
()
exec:target_xfer_partial (2, (null), 0x626626d00x00x10004d44) = 4bytes =
 
3d 20 01 00
Breakpoint 1 at 0x10004d4
file test.cline 1.
(gdbr
r
Starting program
: /Work/aa/test 
[New process 1755977616]
target_thread_architecture (process 1755977616) = 0x61eb0018 [powerpc:common]
target_terminal_ours ()
../../
gdb/target.c:3242internal-errorCan't determine the current address space of thread process 1755977616

A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from terminal]
../../gdb/target.c:3242: internal-error: Can'
t determine the current address space of thread process 1755977616

A problem internal to GDB has been detected
,
further debugging may prove unreliable.
Create a core file of GDB? (or n) [answered Yinput not from terminal]
***
Command 'gdb_751' returned with unfreed signals 80000000!

10/1.Work:aa>


See, output and calling function pretty differently. I do check both GDB sources, and for example, target_memory_map() and target_get_section_table() are new things not present in the old gdb, so that expected that they are called. But next, we fail in target_thread_architecture() with "Can't determine the current address space of thread process 1755977616"

The same happens if I test the new version on pegasos2 too, so it's not x5000 related.

I see that in old amigaos-nat we have implemented "amigaos_xfer_memory", which is then used. Through see what we have at end of amigaos-nat:

Quote:

/* FIXME use to_xfer_partial instead of deprecated_xfer_memory */
/**/amigaos_ops.deprecated_xfer_memory = amigaos_xfer_memory;


So it was already deprecated in 6.3a, and probably now (and in our in 7.5.1 too) "amigaos_xfer_partial()" is should be used instead.

At the moment i tried to just add into amigaos-nat that:


static LONGEST
amigaos_xfer_partial 
(struct target_ops *opsenum target_object object,
              const 
char *annexgdb_byte *readbuf,
              const 
gdb_byte *writebuf,
              
ULONGEST offsetLONGEST len)
{

    
dprintf("we in ?n");

  switch (object)
    {
    case 
TARGET_OBJECT_MEMORY:
      
dprintf("TARGET_OBJECT_MEMORYn");
      return -
1;
      
//amigaos_xfer_memory (offset, len, readbuf, writebuf);

    
default:
      return -
1;
    }

}


And add this:

Quote:

amigaos_ops.to_xfer_partial = amigaos_xfer_partial;


But this one never called, instead still pure exec:target_xfer_partial is called still.

EDIT:

I then build exactly the same 7.5.1 version of GDB on my linux/x64 , enabled debug in gdb/target.c, and that how it looks like there:

kas1e@kas1e-laptop:~/work/gdb-7.5.1/gdb-build/gdb$ ./gdb test
GNU gdb 
(GDB7.5.1
Copyright 
(C2012 Free Software FoundationInc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free softwareyou are free to change and redistribute it.
There is NO WARRANTYto the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For 
bug reporting instructionsplease see:
<
http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/kas1e/work/gdb-7.5.1/gdb-build/gdb/test...done.
(
gdb) list 
target_memory_map ()
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f2800x00x63a18) = 18bytes =
 
55 48 89 e5 48 8d 3d 9f 00 00 00 e8 c6 fe ff ff ...
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f2400x00x63a1) = 1bytes =
 
55
target_get_section_table 
()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f2800x00x63b3) = 3bytes =
 
48 89 e5
target_get_section_table 
()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f3a00x00x63a18) = 18bytes =
 
55 48 89 e5 48 8d 3d 9f 00 00 00 e8 c6 fe ff ff ...
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f3600x00x63a1) = 1bytes =
 
55
target_get_section_table 
()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f3a00x00x63b3) = 3bytes =
 
48 89 e5
1    
#include <stdio.h>
2    int main()
3    {
4    printf("asdfasdfn");
5    }
(
gdb) break 1
target_get_section_table 
()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f2800x00x63a18) = 18bytes =
 
55 48 89 e5 48 8d 3d 9f 00 00 00 e8 c6 fe ff ff ...
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f2400x00x63a1) = 1bytes =
 
55
target_get_section_table 
()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f2800x00x63b3) = 3bytes =
 
48 89 e5
target_get_section_table 
()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f9500x00x63e1) = 1bytes =
 
48
Breakpoint 1 at 0x63e
file test.cline 1.
(gdbr
Starting program
: /home/kas1e/work/gdb-7.5.1/gdb-build/gdb/test 
target_wait 
(17726status) = 17726,   status->kind stoppedsignal SIGTRAP
target_terminal_init 
()
target_terminal_inferior ()
target_resume (17726, continue, 0)
target_wait (17726status) = 17726,   status->kind stoppedsignal SIGTRAP
target_post_startup_inferior 
(17726)
target_create_inferior (/home/kas1e/work/gdb-7.5.1/gdb-build/gdb/test, , xxx1)
target_terminal_ours ()
child:target_xfer_partial (10target.xml0x5652742ee4000x00x04095) = -1
target_thread_architecture 
(process 17726) = 0x5652742ef420 [i386:x86-64]
target_thread_address_space (process 17726) = 1
target_fetch_registers 
(rip) = 9040ddf7ff7f0000 0x7ffff7dd4090 140737351860368
child
:target_xfer_partial (6, (null), 0x5652742f98800x00x04096) = 320bytes =
 
21 00 00 00 00 00 00 00 00 a0 ff f7 ff 7f 00 00 ...
child:target_xfer_partial (6, (null), 0x5652742f99c00x00x1403776) = 0
target_memory_map 
()
child:target_xfer_partial (2, (null), 0x5652742fa8900x00x555555554040504) = 504bytes =
 
06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1ef100x00x55555555463a18) = 6bytes =
 
55 48 89 e5 48 8d
child
:target_xfer_partial (2, (null), 0x7fff9fd1ef160x00x55555555464012) = 8bytes 3d 9f 00 00 00 e8 c6 fe
child
:target_xfer_partial (2, (null), 0x7fff9fd1ef1e0x00x5555555546484) = 4bytes ff ff ...
child:target_xfer_partial (2, (null), 0x7fff9fd1eed00x00x55555555463a1) = 1bytes =
 
55
child
:target_xfer_partial (2, (null), 0x7fff9fd1ef100x00x55555555463b3) = 3bytes =
 
48 89 e5
child
:target_xfer_partial (2, (null), 0x7fff9fd1fa100x00x55555555404056) = 56bytes =
 
06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa100x00x55555555407856) = 56bytes =
 
03 00 00 00 04 00 00 00 38 02 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa100x00x5555555540b056) = 56bytes =
 
01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa100x00x5555555540e856) = 56bytes =
 
01 00 00 00 06 00 00 00 b8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa100x00x55555555412056) = 56bytes =
 
02 00 00 00 06 00 00 00 c8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742faa900x00x555555754dc8496) = 496bytes =
 
01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1faa00x00x555555754e908) = 8bytes =
 
00 00 00 00 00 00 00 00
child
:target_xfer_partial (2, (null), 0x7fff9fd1fa100x00x55555555404056) = 56bytes =
 
06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa100x00x55555555407856) = 56bytes =
 
03 00 00 00 04 00 00 00 38 02 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa100x00x5555555540b056) = 56bytes =
 
01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa100x00x5555555540e856) = 56bytes =
 
01 00 00 00 06 00 00 00 b8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa100x00x55555555412056) = 56bytes =
 
02 00 00 00 06 00 00 00 c8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742faa900x00x555555754dc8496) = 496bytes =
 
01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1faa00x00x555555754e908) = 8bytes =
 
00 00 00 00 00 00 00 00
child
:target_xfer_partial (2, (null), 0x7fff9fd1eff00x00x55555555463a18) = 6bytes =
 
55 48 89 e5 48 8d
child
:target_xfer_partial (2, (null), 0x7fff9fd1eff60x00x55555555464012) = 8bytes 3d 9f 00 00 00 e8 c6 fe
child
:target_xfer_partial (2, (null), 0x7fff9fd1effe0x00x5555555546484) = 4bytes ff ff ...
child:target_xfer_partial (2, (null), 0x7fff9fd1efb00x00x55555555463a1) = 1bytes =
 
55
child
:target_xfer_partial (2, (null), 0x7fff9fd1eff00x00x55555555463b3) = 3bytes =
 
48 89 e5
target_close 
(0)
child:target_xfer_partial (2, (null), 0x7fff9fd1f0c00x00x55555555463a18) = 6bytes =
 
55 48 89 e5 48 8d
child
:target_xfer_partial (2, (null), 0x7fff9fd1f0c60x00x55555555464012) = 8bytes 3d 9f 00 00 00 e8 c6 fe
child
:target_xfer_partial (2, (null), 0x7fff9fd1f0ce0x00x5555555546484) = 4bytes ff ff ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f0800x00x55555555463a1) = 1bytes =
 
55
child
:target_xfer_partial (2, (null), 0x7fff9fd1f0c00x00x55555555463b3) = 3bytes =
 
48 89 e5
target_can_run 
() = 1
child
:target_xfer_partial (2, (null), 0x7fff9fd1fab00x00x7ffff7ffa00064) = 64bytes =
 
7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742ede500x00x7ffff7ffa040224) = 224bytes =
 
01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742fb3300x00x7ffff7ffa0005408) = 5408bytes =
 
7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1ef000x00x55555555463a18) = 6bytes =
 
55 48 89 e5 48 8d
child
:target_xfer_partial (2, (null), 0x7fff9fd1ef060x00x55555555464012) = 8bytes 3d 9f 00 00 00 e8 c6 fe
child
:target_xfer_partial (2, (null), 0x7fff9fd1ef0e0x00x5555555546484) = 4bytes ff ff ...
child:target_xfer_partial (2, (null), 0x7fff9fd1eec00x00x55555555463a1) = 1bytes =
 
55
child
:target_xfer_partial (2, (null), 0x7fff9fd1ef000x00x55555555463b3) = 3bytes =
 
48 89 e5
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_prepare_to_store 
()
target_store_registers (orig_rax) = ffffffffffffffff 0xffffffffffffffff -1
child
:target_xfer_partial (2, (null), 0x7fff9fd1fb700x00x55555555463e1) = 1bytes =
 
48
child
:target_xfer_partial (3, (null), 0x00x565272cbd4a00x55555555463e1) = 1bytes =
 
cc
target_insert_breakpoint 
(0x000055555555463exxx) = 0
child
:target_xfer_partial (2, (null), 0x7fff9fd1fb700x00x7ffff7de3f601) = 1bytes =
 
f3
child
:target_xfer_partial (3, (null), 0x00x565272cbd4a00x7ffff7de3f601) = 1bytes =
 
cc
target_insert_breakpoint 
(0x00007ffff7de3f60xxx) = 0
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_terminal_inferior 
()
target_pass_signals (151, { SIGALRM SIGURG SIGCHLD SIGIO SIGVTALRM SIGPROF SIGWINCH SIGPOLL SIGWAITING SIGLWP SIGPRIO SIGCANCEL })
target_resume (17726, continue, 0)
target_wait (-1status) = 17726,   status->kind stoppedsignal SIGTRAP
target_thread_architecture 
(process 17726) = 0x5652742ef420 [i386:x86-64]
target_thread_address_space (process 17726) = 1
target_fetch_registers 
(rip) = 613fdef7ff7f0000 0x7ffff7de3f61 140737351925601
target_prepare_to_store 
()
target_store_registers (rip) = 603fdef7ff7f0000 0x7ffff7de3f60 140737351925600
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_stopped_by_watchpoint 
() = 0
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_terminal_ours_for_output 
()
child:target_xfer_partial (2, (null), 0x7fff9fd1f4100x00x55555555404056) = 56bytes =
 
06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4100x00x55555555407856) = 56bytes =
 
03 00 00 00 04 00 00 00 38 02 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4100x00x5555555540b056) = 56bytes =
 
01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4100x00x5555555540e856) = 56bytes =
 
01 00 00 00 06 00 00 00 b8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4100x00x55555555412056) = 56bytes =
 
02 00 00 00 06 00 00 00 c8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742faa900x00x555555754dc8496) = 496bytes =
 
01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4a00x00x555555754e908) = 8bytes =
 
40 e1 ff f7 ff 7f 00 00
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4900x00x7ffff7ffe1488) = 8bytes =
 
70 e1 ff f7 ff 7f 00 00
child
:target_xfer_partial (2, (null), 0x5652742fb0700x00x7ffff7ffe17040) = 40bytes =
 
00 40 55 55 55 55 00 00 00 e7 ff f7 ff 7f 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742fadd00x00x7ffff7ffd9f040) = 40bytes =
 
00 30 dd f7 ff 7f 00 00 38 42 55 55 55 55 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x5555555542384) = 4bytes 2f 6c 69 62
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x55555555423c4) = 4bytes 36 34 2f 6c
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x5555555542404) = 4bytes 64 2d 6c 69
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x5555555542444) = 4bytes 6e 75 78 2d
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x5555555542484) = 4bytes 78 38 36 2d
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x55555555424c4) = 4bytes 36 34 2e 73
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x5555555542504) = 4bytes 6f 2e 32 00
child
:target_xfer_partial (2, (null), 0x5652742f28e00x00x7ffff7ffe71040) = 40bytes =
 
00 a0 ff f7 ff 7f 00 00 b0 eb ff f7 ff 7f 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffebb04) = 4bytes 6c 69 6e 75
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffebb44) = 4bytes 78 2d 76 64
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffebb84) = 4bytes 73 6f 2e 73
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffebbc4) = 4bytes 6f 2e 31 00
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4e00x00x7ffff7ffe1404) = 4bytes =
 
01 00 00 00
target_terminal_ours 
()
warningCould not load shared library symbols for linux-vdso.so.1.
Do 
you need "set solib-search-path" or "set sysroot"?
target_terminal_inferior ()
target_thread_address_space (process 17726) = 1
target_thread_address_space 
(process 17726) = 1
child
:target_xfer_partial (3, (null), 0x00x5652742b0ad40x55555555463e1) = 1bytes 48
target_remove_breakpoint 
(0x000055555555463exxx) = 0
child
:target_xfer_partial (3, (null), 0x00x5652742fb2940x7ffff7de3f601) = 1bytes f3
target_remove_breakpoint 
(0x00007ffff7de3f60xxx) = 0
target_thread_address_space 
(process 17726) = 1
target_terminal_inferior 
()
target_pass_signals (0, { })
target_resume (17726step0)
target_wait (-1status) = 17726,   status->kind stoppedsignal SIGTRAP
target_thread_architecture 
(process 17726) = 0x5652742ef420 [i386:x86-64]
target_thread_address_space (process 17726) = 1
target_fetch_registers 
(rip) = 126eddf7ff7f0000 0x7ffff7dd6e12 140737351872018
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_stopped_by_watchpoint 
() = 0
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
child
:target_xfer_partial (2, (null), 0x7fff9fd1f5d00x00x55555555463e1) = 1bytes =
 
48
child
:target_xfer_partial (3, (null), 0x00x565272cbd4a00x55555555463e1) = 1bytes =
 
cc
target_insert_breakpoint 
(0x000055555555463exxx) = 0
child
:target_xfer_partial (2, (null), 0x7fff9fd1f5d00x00x7ffff7de3f601) = 1bytes =
 
f3
child
:target_xfer_partial (3, (null), 0x00x565272cbd4a00x7ffff7de3f601) = 1bytes =
 
cc
target_insert_breakpoint 
(0x00007ffff7de3f60xxx) = 0
target_thread_address_space 
(process 17726) = 1
target_terminal_inferior 
()
target_pass_signals (151, { SIGALRM SIGURG SIGCHLD SIGIO SIGVTALRM SIGPROF SIGWINCH SIGPOLL SIGWAITING SIGLWP SIGPRIO SIGCANCEL })
target_resume (17726, continue, 0)
target_wait (-1status) = 17726,   status->kind stoppedsignal SIGTRAP
target_thread_architecture 
(process 17726) = 0x5652742ef420 [i386:x86-64]
target_thread_address_space (process 17726) = 1
target_fetch_registers 
(rip) = 613fdef7ff7f0000 0x7ffff7de3f61 140737351925601
target_prepare_to_store 
()
target_store_registers (rip) = 603fdef7ff7f0000 0x7ffff7de3f60 140737351925600
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_stopped_by_watchpoint 
() = 0
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_terminal_ours_for_output 
()
child:target_xfer_partial (2, (null), 0x7fff9fd1f4100x00x55555555404056) = 56bytes =
 
06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4100x00x55555555407856) = 56bytes =
 
03 00 00 00 04 00 00 00 38 02 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4100x00x5555555540b056) = 56bytes =
 
01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4100x00x5555555540e856) = 56bytes =
 
01 00 00 00 06 00 00 00 b8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4100x00x55555555412056) = 56bytes =
 
02 00 00 00 06 00 00 00 c8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742faa900x00x555555754dc8496) = 496bytes =
 
01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4a00x00x555555754e908) = 8bytes =
 
40 e1 ff f7 ff 7f 00 00
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4900x00x7ffff7ffe1488) = 8bytes =
 
70 e1 ff f7 ff 7f 00 00
child
:target_xfer_partial (2, (null), 0x5652742f7c500x00x7ffff7ffe17040) = 40bytes =
 
00 40 55 55 55 55 00 00 00 e7 ff f7 ff 7f 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742f28e00x00x7ffff7ffe71040) = 40bytes =
 
00 a0 ff f7 ff 7f 00 00 b0 eb ff f7 ff 7f 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffebb04) = 4bytes 6c 69 6e 75
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffebb44) = 4bytes 78 2d 76 64
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffebb84) = 4bytes 73 6f 2e 73
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffebbc4) = 4bytes 6f 2e 31 00
child
:target_xfer_partial (2, (null), 0x5652742f7c500x00x7ffff7fd500040) = 40bytes =
 
00 20 9e f7 ff 7f 00 00 d0 ed ff f7 ff 7f 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffedd04) = 4bytes 2f 6c 69 62
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffedd44) = 4bytes 2f 78 38 36
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffedd84) = 4bytes 5f 36 34 2d
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffeddc4) = 4bytes 6c 69 6e 75
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffede04) = 4bytes 78 2d 67 6e
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffede44) = 4bytes 75 2f 6c 69
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffede84) = 4bytes 62 63 2e 73
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x7ffff7ffedec4) = 4bytes 6f 2e 36 00
child
:target_xfer_partial (2, (null), 0x5652742e73900x00x7ffff7ffd9f040) = 40bytes =
 
00 30 dd f7 ff 7f 00 00 38 42 55 55 55 55 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x5555555542384) = 4bytes 2f 6c 69 62
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x55555555423c4) = 4bytes 36 34 2f 6c
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x5555555542404) = 4bytes 64 2d 6c 69
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x5555555542444) = 4bytes 6e 75 78 2d
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x5555555542484) = 4bytes 78 38 36 2d
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x55555555424c4) = 4bytes 36 34 2e 73
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4540x00x5555555542504) = 4bytes 6f 2e 32 00
child
:target_xfer_partial (2, (null), 0x7fff9fd1f4e00x00x7ffff7ffe1404) = 4bytes =
 
01 00 00 00
child
:target_xfer_partial (2, (null), 0x7fff9fd1e9f00x00x55555555463a18) = 6bytes =
 
55 48 89 e5 48 8d
child
:target_xfer_partial (2, (null), 0x7fff9fd1e9f60x00x55555555464012) = 8bytes 3d 9f 00 00 00 e8 c6 fe
child
:target_xfer_partial (2, (null), 0x7fff9fd1e9fe0x00x5555555546484) = 4bytes ff ff ...
child:target_xfer_partial (2, (null), 0x7fff9fd1e9b00x00x55555555463a1) = 1bytes =
 
55
child
:target_xfer_partial (2, (null), 0x7fff9fd1e9f00x00x55555555463b3) = 3bytes =
 
48 89 e5
target_terminal_inferior 
()
target_thread_address_space (process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
child
:target_xfer_partial (3, (null), 0x00x5652742ee4a40x55555555463e1) = 1bytes 48
target_remove_breakpoint 
(0x000055555555463exxx) = 0
child
:target_xfer_partial (3, (null), 0x00x5652742fb2940x7ffff7de3f601) = 1bytes f3
target_remove_breakpoint 
(0x00007ffff7de3f60xxx) = 0
target_thread_address_space 
(process 17726) = 1
target_terminal_inferior 
()
target_pass_signals (0, { })
target_resume (17726step0)
target_wait (-1status) = 17726,   status->kind stoppedsignal SIGTRAP
target_thread_architecture 
(process 17726) = 0x5652742ef420 [i386:x86-64]
target_thread_address_space (process 17726) = 1
target_fetch_registers 
(rip) = f174ddf7ff7f0000 0x7ffff7dd74f1 140737351873777
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_stopped_by_watchpoint 
() = 0
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
child
:target_xfer_partial (2, (null), 0x7fff9fd1f5d00x00x55555555463e1) = 1bytes =
 
48
child
:target_xfer_partial (3, (null), 0x00x565272cbd4a00x55555555463e1) = 1bytes =
 
cc
target_insert_breakpoint 
(0x000055555555463exxx) = 0
child
:target_xfer_partial (2, (null), 0x7fff9fd1f5d00x00x7ffff7de3f601) = 1bytes =
 
f3
child
:target_xfer_partial (3, (null), 0x00x565272cbd4a00x7ffff7de3f601) = 1bytes =
 
cc
target_insert_breakpoint 
(0x00007ffff7de3f60xxx) = 0
target_thread_address_space 
(process 17726) = 1
target_terminal_inferior 
()
target_pass_signals (151, { SIGALRM SIGURG SIGCHLD SIGIO SIGVTALRM SIGPROF SIGWINCH SIGPOLL SIGWAITING SIGLWP SIGPRIO SIGCANCEL })
target_resume (17726, continue, 0)
target_wait (-1status) = 17726,   status->kind stoppedsignal SIGTRAP
target_thread_architecture 
(process 17726) = 0x5652742ef420 [i386:x86-64]
target_thread_address_space (process 17726) = 1
target_fetch_registers 
(rip) = 3f46555555550000 0x55555555463f 93824992233023
target_prepare_to_store 
()
target_store_registers (rip) = 3e46555555550000 0x55555555463e 93824992233022
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
target_stopped_by_watchpoint 
() = 0
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
child
:target_xfer_partial (3, (null), 0x00x5652742ee4a40x55555555463e1) = 1bytes 48
target_remove_breakpoint 
(0x000055555555463exxx) = 0
child
:target_xfer_partial (3, (null), 0x00x5652742fb2940x7ffff7de3f601) = 1bytes f3
target_remove_breakpoint 
(0x00007ffff7de3f60xxx) = 0
target_terminal_ours 
()
target_thread_address_space (process 17726) = 1

target_thread_address_space 
(process 17726) = 1
child
:target_xfer_partial (2, (null), 0x7fff9fd1faf70x00x55555555463e1) = 1bytes 48
child
:target_xfer_partial (2, (null), 0x7fff9fd1faf70x00x55555555463e1) = 1bytes 48
child
:target_xfer_partial (3, (null), 0x565274335d5c0x00x7fffffffde8064) = 64bytes 60 46 55 55 ...
child:target_xfer_partial (4, (null), 0x5652742f98200x00x7fffffffdea88) = 8bytes =
 
f7 3b a0 f7 ff 7f 00 00
target_thread_address_space 
(process 17726) = 1
target_thread_address_space 
(process 17726) = 1
Breakpoint 1
main () at test.c:4
4    printf
("asdfasdfn");
target_thread_address_space (process 17726) = 1
(gdb)


As can be seen those "nulls" in the exec:target_xfer_partial at the begining are fine, and then on x86 we have:

Quote:

target_thread_architecture (process 17726) = 0x5652742ef420 [i386:x86-64]
target_thread_address_space (process 17726) = 1


So on our side we didn't reach "target_thread_address_space" and fail right after "target_thread_architecture".

And our failing part in gdb/target.c are:

/* Determine the current address space of thread PTID.  */

struct address_space *
target_thread_address_space (ptid_t ptid)
{
  
struct address_space *aspace;
  
struct inferior *inf;
  
struct target_ops *t;

  for (
current_target.beneath!= NULLt->beneath)
    {
      if (
t->to_thread_address_space != NULL)
    {
      
aspace t->to_thread_address_space (tptid);
      
gdb_assert (aspace);

      if (
targetdebug)
        
fprintf_unfiltered (gdb_stdlog,
                
"target_thread_address_space (%s) = %dn",
                
target_pid_to_str (ptid),
                
address_space_num (aspace));
      return 
aspace;
    }
    }

  
/* Fall-back to the "main" address space of the inferior.  */
  
inf find_inferior_pid (ptid_get_pid (ptid));

  if (
inf == NULL || inf->aspace == NULL)
    
internal_error (__FILE____LINE__,
            
_("Can't determine the current "
              "address space of thread %sn"
),
            
target_pid_to_str (ptid));

  return 
inf->aspace;
}



Added few printfs, and:

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


Edited by kas1e on 2021/2/26 4:26:09
Edited by kas1e on 2021/2/26 4:31:20
Edited by kas1e on 2021/2/26 4:36:48
Edited by kas1e on 2021/2/26 4:38:03
Edited by kas1e on 2021/2/26 4:52:45
Edited by kas1e on 2021/2/26 19:23:23
Edited by kas1e on 2021/2/26 19:23:55
Edited by kas1e on 2021/2/26 19:28:36
Edited by kas1e on 2021/2/26 19:48:05
Edited by kas1e on 2021/2/26 19:54:24
Edited by kas1e on 2021/2/26 20:22:34
_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: GDB
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1800
@afxgroup

Quote:

Unlucky fseeko64 is not working correctly on newlib. Don't know if something has broken from your tests but i've tried your p7zip with an 8GB file and it fail. I've tested it with my clib2 version i'm using now and it is working.
So something has changed in newlib code (most probably)


As a test I just used p7zip on my beta installation to create a 6.5GiB archive file from ~11GiB worth of music files and it worked without problems, though it took about 14 hours to finish.

I then ran "7za t" on the archive on both AmigaOS and Ubuntu and both reported that the archive was okay and with no errors.

Then I extracted the archive on AmigaOS using the p7zip port again and this also worked fine with no errors (I also compared md5sums on a couple of the extracted files and they do match the originals).

What file system are you using? JXFS has broken relative seeking as well as other bugs that will never be fixed because it is no longer developed and should not be used anymore. For the tests above I used SFS\2 partitions (ssh2-handler was used to transfer the archive to my Ubuntu system for the test there).

   Report Go to top

Re: GDB
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7020
@All
Installed PPC Linux on my x5000 (Fienix one), and build GDB 7.5.1 there as well, with also enabling debug in the gdb/target.c: to see, maybe with PPC things a bit different than on x64. And loading a simple test case with "list" and "break 1 / run", as in previous tests with our current GDB 6.3a from SDK/ GDB 7.5.1 on os4 / GDB 7.5.1 linux/x64, but now on Linux PPC on x5000 looks like this:

root@Fienix:~/work/gdb-7.5.1/gdb-build/gdb# ./gdb ../test
GNU gdb (GDB7.5.1
Copyright 
(C2012 Free Software FoundationInc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free softwareyou are free to change and redistribute it.
There is NO WARRANTYto the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc64-unknown-linux-gnu".
For 
bug reporting instructionsplease see:
<
http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/work/gdb-7.5.1/gdb-build/test...done.
(
gdb) list
target_memory_map ()
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0xffec32d80x00x63c4) = 4bytes 80 7e 80 00
target_get_section_table 
()
exec:target_xfer_partial (2, (null), 0xffec33c80x00x63c4) = 4bytes 80 7e 80 00
1    
#include <stdio.h>
2    int main()
3    {
4    printf("asdfasdfn");
5    }
(
gdb) break 1
target_get_section_table 
()
exec:target_xfer_partial (2, (null), 0xffec32d80x00x63c4) = 4bytes 80 7e 80 00
target_get_section_table 
()
exec:target_xfer_partial (2, (null), 0xffec36000x00x63c4) = 4bytes =
 
80 7e 80 00
Breakpoint 1 at 0x63c
file test.cline 1.
(gdbr
Starting program
: /root/work/gdb-7.5.1/gdb-build/test 
target_wait 
(27384status) = 27384,   status->kind stoppedsignal SIGTRAP
target_terminal_init 
()
target_terminal_inferior ()
target_resume (27384, continue, 0)
target_wait (27384status) = 27384,   status->kind stoppedsignal SIGTRAP
target_post_startup_inferior 
(27384)
target_create_inferior (/root/work/gdb-7.5.1/gdb-build/test, , xxx1)
target_terminal_ours ()
child:target_xfer_partial (10target.xml0x1576ee00x00x04095) = -1
child
:target_xfer_partial (6, (null), 0x1576ee00x00x04096) = 288bytes =
 
00 00 00 16 00 00 00 16 00 00 00 16 00 00 00 16 ...
child:target_xfer_partial (6, (null), 0x15770000x00x1203808) = 0
target_thread_architecture 
(process 27384) = 0x15791d0 [powerpc:common]
target_thread_address_space (process 27384) = 1
target_fetch_registers 
(pc) = f7fda5d0 0xf7fda5d0 4160595408
target_memory_map 
()
child:target_xfer_partial (2, (null), 0x154f5e00x00x400034288) = 288bytes =
 
00 00 00 06 00 00 00 34 00 00 00 34 00 00 00 34 ...
child:target_xfer_partial (2, (null), 0xffec2f780x00x40063c4) = 4bytes 80 7e 80 00
child
:target_xfer_partial (2, (null), 0xffec35f80x00x40003432) = 32bytes 00 00 00 06 00 00 00 34 ...
child:target_xfer_partial (2, (null), 0xffec35f80x00x40005432) = 32bytes 00 00 00 03 00 00 01 54 ...
child:target_xfer_partial (2, (null), 0xffec35f80x00x40007432) = 32bytes 00 00 00 01 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0xffec35f80x00x40009432) = 32bytes 00 00 00 01 00 00 fe c8 ...
child:target_xfer_partial (2, (null), 0xffec35f80x00x4000b432) = 32bytes 00 00 00 02 00 00 fe f8 ...
child:target_xfer_partial (2, (null), 0x157a7700x00x41fef8248) = 248bytes =
 
00 00 00 01 00 00 00 01 00 00 00 0c 00 00 04 40 ...
child:target_xfer_partial (2, (null), 0xffec36780x00x41ff5c4) = 4bytes 00 00 00 00
child
:target_xfer_partial (2, (null), 0xffec35f80x00x40003432) = 32bytes 00 00 00 06 00 00 00 34 ...
child:target_xfer_partial (2, (null), 0xffec35f80x00x40005432) = 32bytes 00 00 00 03 00 00 01 54 ...
child:target_xfer_partial (2, (null), 0xffec35f80x00x40007432) = 32bytes 00 00 00 01 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0xffec35f80x00x40009432) = 32bytes 00 00 00 01 00 00 fe c8 ...
child:target_xfer_partial (2, (null), 0xffec35f80x00x4000b432) = 32bytes 00 00 00 02 00 00 fe f8 ...
child:target_xfer_partial (2, (null), 0x157a7700x00x41fef8248) = 248bytes =
 
00 00 00 01 00 00 00 01 00 00 00 0c 00 00 04 40 ...
child:target_xfer_partial (2, (null), 0xffec36780x00x41ff5c4) = 4bytes 00 00 00 00
child
:target_xfer_partial (2, (null), 0xffec30780x00x40063c4) = 4bytes 80 7e 80 00
target_close 
(0)
child:target_xfer_partial (2, (null), 0xffec31380x00x40063c4) = 4bytes 80 7e 80 00
target_can_run 
() = 1
child
:target_xfer_partial (2, (null), 0xffec36e80x00x10000052) = 52bytes 7f 45 4c 46 01 02 01 00 ...
child:target_xfer_partial (2, (null), 0x15309300x00x100034128) = 128bytes =
 
00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x15809900x00x1000005604) = 5604bytes =
 
7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0xffec2fe80x00x40063c4) = 4bytes 80 7e 80 00
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_prepare_to_store 
()
target_store_registers (trap) = ffffffff 0xffffffff 4294967295
child
:target_xfer_partial (2, (null), 0xffec37000x00x40063c4) = 4bytes =
 
80 7e 80 00
child
:target_xfer_partial (3, (null), 0x00xf514500x40063c4) = 4bytes =
 
7d 82 10 08
target_insert_breakpoint 
(0x000000000040063cxxx) = 0
child
:target_xfer_partial (2, (null), 0xffec37000x00xf7fcf0d04) = 4bytes =
 
4e 80 00 20
child
:target_xfer_partial (3, (null), 0x00xf514500xf7fcf0d04) = 4bytes =
 
7d 82 10 08
target_insert_breakpoint 
(0x00000000f7fcf0d0xxx) = 0
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_terminal_inferior 
()
target_pass_signals (151, { SIGALRM SIGURG SIGCHLD SIGIO SIGVTALRM SIGPROF SIGWINCH SIGPOLL SIGWAITING SIGLWP SIGPRIO SIGCANCEL })
target_resume (27384, continue, 0)
target_wait (-1status) = 27384,   status->kind stoppedsignal SIGTRAP
target_thread_architecture 
(process 27384) = 0x15791d0 [powerpc:common]
target_thread_address_space (process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_fetch_registers 
(pc) = f7fcf0d0 0xf7fcf0d0 4160549072
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_stopped_by_watchpoint 
() = 0
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_terminal_ours_for_output 
()
child:target_xfer_partial (2, (null), 0xffec32380x00x40003432) = 32bytes 00 00 00 06 00 00 00 34 ...
child:target_xfer_partial (2, (null), 0xffec32380x00x40005432) = 32bytes 00 00 00 03 00 00 01 54 ...
child:target_xfer_partial (2, (null), 0xffec32380x00x40007432) = 32bytes 00 00 00 01 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0xffec32380x00x40009432) = 32bytes 00 00 00 01 00 00 fe c8 ...
child:target_xfer_partial (2, (null), 0xffec32380x00x4000b432) = 32bytes 00 00 00 02 00 00 fe f8 ...
child:target_xfer_partial (2, (null), 0x157a7700x00x41fef8248) = 248bytes =
 
00 00 00 01 00 00 00 01 00 00 00 0c 00 00 04 40 ...
child:target_xfer_partial (2, (null), 0xffec32b80x00x41ff5c4) = 4bytes f7 ff e9 0c
child
:target_xfer_partial (2, (null), 0xffec32e00x00xf7ffe9104) = 4bytes =
 
f7 ff e9 20
child
:target_xfer_partial (2, (null), 0x157e5100x00xf7ffe92020) = 20bytes =
 
00 40 00 00 f7 ff ec 10 00 41 fe f8 f7 ff e5 38 ...
child:target_xfer_partial (2, (null), 0x157e5100x00xf7ffe53820) = 20bytes =
 
f7 fb e0 00 00 40 01 54 f7 ff d7 0c f7 ff ec 20 ...
child:target_xfer_partial (2, (null), 0xffec32980x00x4001544) = 4bytes 2f 6c 69 62
child
:target_xfer_partial (2, (null), 0xffec32980x00x4001584) = 4bytes 2f 6c 64 2e
child
:target_xfer_partial (2, (null), 0xffec32980x00x40015c4) = 4bytes 73 6f 2e 31
child
:target_xfer_partial (2, (null), 0xffec32980x00x4001604) = 4bytes 00 00 00 00
child
:target_xfer_partial (2, (null), 0x157e5100x00xf7ffec2020) = 20bytes =
 
00 10 00 00 f7 ff ee a0 00 10 0e b4 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0xffec32980x00xf7ffeea04) = 4bytes 6c 69 6e 75
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffeea44) = 4bytes 78 2d 76 64
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffeea84) = 4bytes 73 6f 33 32
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffeeac4) = 4bytes 2e 73 6f 2e
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffeeb04) = 4bytes 31 00 00 00
child
:target_xfer_partial (2, (null), 0xffec33080x00xf7ffe90c4) = 4bytes 00 00 00 01
target_terminal_ours 
()
warningCould not load shared library symbols for linux-vdso32.so.1.
Do 
you need "set solib-search-path" or "set sysroot"?
target_terminal_inferior ()
target_thread_address_space (process 27384) = 1
target_thread_address_space 
(process 27384) = 1
child
:target_xfer_partial (2, (null), 0xffec33b80x00x40063c4) = 4bytes 7d 82 10 08
child
:target_xfer_partial (3, (null), 0x00x15a07bc0x40063c4) = 4bytes 80 7e 80 00
target_remove_breakpoint 
(0x000000000040063cxxx) = 0
child
:target_xfer_partial (2, (null), 0xffec33b80x00xf7fcf0d04) = 4bytes 7d 82 10 08
child
:target_xfer_partial (3, (null), 0x00x151435c0xf7fcf0d04) = 4bytes 4e 80 00 20
target_remove_breakpoint 
(0x00000000f7fcf0d0xxx) = 0
target_thread_address_space 
(process 27384) = 1
child
:target_xfer_partial (2, (null), 0xffec33880x00xf7fcf0d04) = 4bytes 4e 80 00 20
target_terminal_inferior 
()
target_pass_signals (0, { })
target_resume (27384step0)
target_wait (-1status) = 27384,   status->kind stoppedsignal SIGTRAP
target_thread_architecture 
(process 27384) = 0x15791d0 [powerpc:common]
target_thread_address_space (process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_fetch_registers 
(pc) = f7fc3140 0xf7fc3140 4160500032
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_stopped_by_watchpoint 
() = 0
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
child
:target_xfer_partial (2, (null), 0xffec33900x00x40063c4) = 4bytes =
 
80 7e 80 00
child
:target_xfer_partial (3, (null), 0x00xf514500x40063c4) = 4bytes =
 
7d 82 10 08
target_insert_breakpoint 
(0x000000000040063cxxx) = 0
child
:target_xfer_partial (2, (null), 0xffec33900x00xf7fcf0d04) = 4bytes =
 
4e 80 00 20
child
:target_xfer_partial (3, (null), 0x00xf514500xf7fcf0d04) = 4bytes =
 
7d 82 10 08
target_insert_breakpoint 
(0x00000000f7fcf0d0xxx) = 0
target_thread_address_space 
(process 27384) = 1
target_terminal_inferior 
()
target_pass_signals (151, { SIGALRM SIGURG SIGCHLD SIGIO SIGVTALRM SIGPROF SIGWINCH SIGPOLL SIGWAITING SIGLWP SIGPRIO SIGCANCEL })
target_resume (27384, continue, 0)
target_wait (-1status) = 27384,   status->kind stoppedsignal SIGTRAP
target_thread_architecture 
(process 27384) = 0x15791d0 [powerpc:common]
target_thread_address_space (process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_fetch_registers 
(pc) = f7fcf0d0 0xf7fcf0d0 4160549072
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_stopped_by_watchpoint 
() = 0
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_terminal_ours_for_output 
()
child:target_xfer_partial (2, (null), 0xffec32380x00x40003432) = 32bytes 00 00 00 06 00 00 00 34 ...
child:target_xfer_partial (2, (null), 0xffec32380x00x40005432) = 32bytes 00 00 00 03 00 00 01 54 ...
child:target_xfer_partial (2, (null), 0xffec32380x00x40007432) = 32bytes 00 00 00 01 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0xffec32380x00x40009432) = 32bytes 00 00 00 01 00 00 fe c8 ...
child:target_xfer_partial (2, (null), 0xffec32380x00x4000b432) = 32bytes 00 00 00 02 00 00 fe f8 ...
child:target_xfer_partial (2, (null), 0x157a7700x00x41fef8248) = 248bytes =
 
00 00 00 01 00 00 00 01 00 00 00 0c 00 00 04 40 ...
child:target_xfer_partial (2, (null), 0xffec32b80x00x41ff5c4) = 4bytes f7 ff e9 0c
child
:target_xfer_partial (2, (null), 0xffec32e00x00xf7ffe9104) = 4bytes =
 
f7 ff e9 20
child
:target_xfer_partial (2, (null), 0x15a1e000x00xf7ffe92020) = 20bytes =
 
00 40 00 00 f7 ff ec 10 00 41 fe f8 f7 ff ec 20 ...
child:target_xfer_partial (2, (null), 0x15a1e000x00xf7ffec2020) = 20bytes =
 
00 10 00 00 f7 ff ee a0 00 10 0e b4 f7 fe 70 00 ...
child:target_xfer_partial (2, (null), 0xffec32980x00xf7ffeea04) = 4bytes 6c 69 6e 75
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffeea44) = 4bytes 78 2d 76 64
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffeea84) = 4bytes 73 6f 33 32
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffeeac4) = 4bytes 2e 73 6f 2e
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffeeb04) = 4bytes 31 00 00 00
child
:target_xfer_partial (2, (null), 0x15a1e000x00xf7fe700020) = 20bytes =
 
00 20 c0 00 f7 ff ef b0 00 3e 98 7c f7 ff e5 38 ...
child:target_xfer_partial (2, (null), 0xffec32980x00xf7ffefb04) = 4bytes 2f 6c 69 62
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffefb44) = 4bytes 2f 70 6f 77
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffefb84) = 4bytes 65 72 70 63
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffefbc4) = 4bytes 2d 6c 69 6e
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffefc04) = 4bytes 75 78 2d 67
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffefc44) = 4bytes 6e 75 2f 6c
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffefc84) = 4bytes 69 62 63 2e
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffefcc4) = 4bytes 73 6f 2e 36
child
:target_xfer_partial (2, (null), 0xffec32980x00xf7ffefd04) = 4bytes 00 00 00 00
child
:target_xfer_partial (2, (null), 0x15a1e000x00xf7ffe53820) = 20bytes =
 
f7 fb e0 00 00 40 01 54 f7 ff d7 0c 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0xffec32980x00x4001544) = 4bytes 2f 6c 69 62
child
:target_xfer_partial (2, (null), 0xffec32980x00x4001584) = 4bytes 2f 6c 64 2e
child
:target_xfer_partial (2, (null), 0xffec32980x00x40015c4) = 4bytes 73 6f 2e 31
child
:target_xfer_partial (2, (null), 0xffec32980x00x4001604) = 4bytes 00 00 00 00
child
:target_xfer_partial (2, (null), 0xffec33080x00xf7ffe90c4) = 4bytes 00 00 00 01
child
:target_xfer_partial (2, (null), 0xffec2cb80x00x40063c4) = 4bytes 80 7e 80 00
target_terminal_inferior 
()
target_thread_address_space (process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
child
:target_xfer_partial (2, (null), 0xffec33b80x00x40063c4) = 4bytes 7d 82 10 08
child
:target_xfer_partial (3, (null), 0x00x155c32c0x40063c4) = 4bytes 80 7e 80 00
target_remove_breakpoint 
(0x000000000040063cxxx) = 0
child
:target_xfer_partial (2, (null), 0xffec33b80x00xf7fcf0d04) = 4bytes 7d 82 10 08
child
:target_xfer_partial (3, (null), 0x00x151435c0xf7fcf0d04) = 4bytes 4e 80 00 20
target_remove_breakpoint 
(0x00000000f7fcf0d0xxx) = 0
target_thread_address_space 
(process 27384) = 1
child
:target_xfer_partial (2, (null), 0xffec33880x00xf7fcf0d04) = 4bytes 4e 80 00 20
target_terminal_inferior 
()
target_pass_signals (0, { })
target_resume (27384step0)
target_wait (-1status) = 27384,   status->kind stoppedsignal SIGTRAP
target_thread_architecture 
(process 27384) = 0x15791d0 [powerpc:common]
target_thread_address_space (process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_fetch_registers 
(pc) = f7fc3a98 0xf7fc3a98 4160502424
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_stopped_by_watchpoint 
() = 0
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
child
:target_xfer_partial (2, (null), 0xffec33900x00x40063c4) = 4bytes =
 
80 7e 80 00
child
:target_xfer_partial (3, (null), 0x00xf514500x40063c4) = 4bytes =
 
7d 82 10 08
target_insert_breakpoint 
(0x000000000040063cxxx) = 0
child
:target_xfer_partial (2, (null), 0xffec33900x00xf7fcf0d04) = 4bytes =
 
4e 80 00 20
child
:target_xfer_partial (3, (null), 0x00xf514500xf7fcf0d04) = 4bytes =
 
7d 82 10 08
target_insert_breakpoint 
(0x00000000f7fcf0d0xxx) = 0
target_thread_address_space 
(process 27384) = 1
target_terminal_inferior 
()
target_pass_signals (151, { SIGALRM SIGURG SIGCHLD SIGIO SIGVTALRM SIGPROF SIGWINCH SIGPOLL SIGWAITING SIGLWP SIGPRIO SIGCANCEL })
target_resume (27384, continue, 0)
target_wait (-1status) = 27384,   status->kind stoppedsignal SIGTRAP
target_thread_architecture 
(process 27384) = 0x15791d0 [powerpc:common]
target_thread_address_space (process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_fetch_registers 
(pc) = 0040063c 0x40063c 4195900
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
target_stopped_by_watchpoint 
() = 0
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
child
:target_xfer_partial (2, (null), 0xffec37080x00x40063c4) = 4bytes 7d 82 10 08
child
:target_xfer_partial (3, (null), 0x00x155c32c0x40063c4) = 4bytes 80 7e 80 00
target_remove_breakpoint 
(0x000000000040063cxxx) = 0
child
:target_xfer_partial (2, (null), 0xffec37080x00xf7fcf0d04) = 4bytes 7d 82 10 08
child
:target_xfer_partial (3, (null), 0x00x151435c0xf7fcf0d04) = 4bytes 4e 80 00 20
target_remove_breakpoint 
(0x00000000f7fcf0d0xxx) = 0
target_terminal_ours 
()
target_thread_address_space (process 27384) = 1

target_thread_address_space 
(process 27384) = 1
child
:target_xfer_partial (2, (null), 0xffec36880x00x40063c4) = 4bytes 80 7e 80 00
child
:target_xfer_partial (2, (null), 0xffec36880x00x4006384) = 4bytes 3b de 78 bc
child
:target_xfer_partial (2, (null), 0xffec36880x00x40063c4) = 4bytes 80 7e 80 00
child
:target_xfer_partial (2, (null), 0xffec36880x00x4006384) = 4bytes 3b de 78 bc
target_fetch_registers 
(r31) = ffffe690 0xffffe690 4294960784
child
:target_xfer_partial (3, (null), 0x153cd540x00xffffe68064) = 64bytes ff ff e6 a0 00 00 00 00 00 40 06 14 ...
child:target_xfer_partial (4, (null), 0x15802900x00xffffe6a44) = 4bytes =
 
00 23 20 f4
target_thread_address_space 
(process 27384) = 1
target_thread_address_space 
(process 27384) = 1
Breakpoint 1
main () at test.c:4
4    printf
("asdfasdfn");
target_thread_address_space (process 27384) = 1
(gdb)


So, the same target_memory_map() and target_get_section_table() at the begining, the same "nulls" in the begining of the exec:target_xfer_partial() so all fine there.

And when we set break and do run, then it also show after every

target_thread_architecture (process 27384) = 0x15791d0 [powerpc:common]

then :
target_thread_address_space (process 27384) = 1

So, for us as can be seen target_thread_address_space() is not happens.

Dunno what the problem is: or the way of calling functions changes, and we need to implement some other one, or we just need to deal with all those "infs / ptids" so that stuff will work correctly.

Anyone ?:)

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: GDB
Just popping in
Joined:
2011/7/20 20:01
From In the sticks
Posts: 172
Sorry I've been away from this for a few days, I should now have a chance to catch up.

   Report Go to top

Re: GDB
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7020
@billyfish

To make our life easier I commit another change where add to the gdb/exec.c necessary changes, so exec_seglist is no more NULL, and we going further.

And then, we meet with the error about which I told in the last posts: ../../gdb/target.c:3242: internal-error: Can't determine the current address space of thread process.

target_thread_address_space() is in that gdb/target.c, and if we add there printfs, then :

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

It feels that we have issues with "pids" and whole "inf" pointers.

For enabling debug output in gdb/target.c, on line 208 of that file change static int targetdebug = 0; to static int targetdebug = 1;

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: GDB
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7020
@sTix
Maybe you also can have a look at that problem we had now ?:)

@All
Almost every os4 developer all the time says that we need a debugger, and want to have working GDB. Now, things can be done, if any of us bit by bit will fix issues. Is no one interesting in spending a day/two on that issue on which we stuck for a damn week already?


Edited by kas1e on 2021/3/6 8:18:47
Edited by kas1e on 2021/3/6 8:19:45
_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: GDB
Just popping in
Joined:
2011/7/20 20:01
From In the sticks
Posts: 172
@kas1e

Sorry, home schooling keeps getting in the way! After Monday, it will be easier as they'll be back in school. As for GDB, we've made good progress, we'll get there I've been taking a look at the IExec debug interface too

   Report Go to top

Re: GDB
Just popping in
Joined:
2006/11/30 11:59
From Lund, Sweden
Posts: 142
@kas1e

Just like billyfish, I'm also a bit bogged down at the moment. But I don't think being stuck for a week is a disaster. I think this will take quite some time, it's not a minor bump, it's catching up with 10+ years of work in a project that has 10+ times as many developers as the complete Amiga community has, all flavours included. I really hope I'm wrong though :)

   Report Go to top

Re: GDB
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7020
@billyfish
Quote:

I've been taking a look at the IExec debug interface too


Issues with x5000 surely can wait till we make basics works on other machines where it should work.

First, we need to understand why we "Can't determine the current address space of thread process". My guess is about inf/ptid things. Maybe even our new changes may cause this? Alternatively, there some functions which need to be implemented in the AmigaOS-nat part, and as example we can take any other one, like, for example, "rs6000-nat.c".


@sTix
Quote:

But I don't think being stuck for a week is a disaster.


Disaster is a loosing of interest which we had now :) Things can be done much faster if developers have just lost an hour in a day on GDB, which for 10 years most developers ask for. And we can have a working version just in few weeks. Sadly, while I always find the time, I never was a developer, because of which need always beg someone else :( And when there is no progress in days and weeks, and even no sign of it, it just makes it feels like a dead-end, like only I have interest in.





Edited by kas1e on 2021/3/8 18:51:05
_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: GDB
Just popping in
Joined:
2011/7/20 20:01
From In the sticks
Posts: 172
@kas1e

The reason I've been looking at the debug interface isn't for the x5000, it's that functions like ObtainDebugSymbol() and StackTrace() may be what we need to be able to do things like inspect a variable by its name rather than having to inspect registers or anything like that.

   Report Go to top

Re: GDB
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7020
@billyfish
:) Yeah... That will be helpful once we deal with the main issue we had now. But without fixing the current issue we can't progress further.


Edited by kas1e on 2021/3/8 18:50:34
_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: GDB
Just popping in
Joined:
2011/7/20 20:01
From In the sticks
Posts: 172
@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.


   Report Go to top

Re: GDB
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7020
@billyfish

I checked other "nat" realizations for other platforms, and seems that in general, we do it still correct and as expected even in 7.5.1: we fill the "struct target_ops *xxxx"; (in our case we call it like "static struct target_ops amigaos_ops";) then fill necessary bits, and call "add_target(&xxxx);" Then if we have filled "to_create_inferior" with our inferior function it called them when need it. Just in our case, for some reason, it never added to the inferior list in inferior.c anymore.

But I have never seen any other platform direct call to add_inferior_with_spaces().

My bet we then need fully rewrite this amigaos_create_inferior() just from scratch, with our own code. Without needs to worry wtf there from before time (and in that process, we will then understand how it all works).

And anyway, is it mean that this part of code in our current amigaos_create_inferior() just doing nothing ? :

Quote:

inferior_ptid = pid_to_ptid ((int)debug_data.current_process);
dprintf("inferior_ptid=%p\n",inferior_ptid);
add_thread(inferior_ptid);



Quote:

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.


I can ask in os4beta/dev maillists, or Thomas directly about. But what you mean by OS4 have a shared address space? Shared with what/by what ?:) As I aware all amigaos4 memory is shared, and everyone can access any part of it. As well as we have "shared" tags when allocating memory too (but I suck at those details)





Edited by kas1e on 2021/3/8 18:59:35
Edited by kas1e on 2021/3/8 19:01:30
_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top


« 1 2 3 4 (5) 6 7 8 »



[Advanced Search]



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project