Headlines |
-
videothumbnailer.lha - graphics/icon
Apr 12, 2021
-
uaegfxforos4.lha - driver/video
Apr 10, 2021
-
drawing_dt.lha - datatype/image
Apr 9, 2021
-
jansson_library.lha - development/library/misc
Apr 8, 2021
-
wormwars.lha - game/action
Apr 8, 2021
-
zapperng.lha - utility/workbench
Apr 8, 2021
-
basque.lha - game/misc
Apr 7, 2021
-
egalaxtouchusbfd.lha - driver/input
Apr 4, 2021
-
itmtouchusbfd.lha - driver/input
Apr 4, 2021
-
touchdevice.lha - driver/input
Apr 4, 2021
|
|
|
|
Re: GDB |
Posted on: 2/24 21:59
#81 |
Just popping in 
Joined: 2011/7/20 20:01
From In the sticks
Posts: 167
|
@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.
|
|
|
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.
|
|
|
Re: GDB |
|
Home away from home 
Joined: 2006/11/26 21:45
From a dying planet
Posts: 4025
|
@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
|
|
Re: GDB |
|
Home away from home 
Joined: 2007/9/11 12:31
From Russia
Posts: 6928
|
@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.
|
|
|
Re: GDB |
|
Home away from home 
Joined: 2006/11/26 21:45
From a dying planet
Posts: 4025
|
@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
|
|
Re: GDB |
Posted on: 2/25 10:00
#86 |
Just popping in 
Joined: 2011/7/20 20:01
From In the sticks
Posts: 167
|
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!
|
|
|
Re: GDB |
Posted on: 2/25 11:14
#87 |
Home away from home 
Joined: 2007/9/11 12:31
From Russia
Posts: 6928
|
@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):  Through crashes in rl_dispatch_subseq() once it tried to operate with.
Edited by kas1e on 2021/2/25 13:13:48
|
|
|
Re: GDB |
|
Home away from home 
Joined: 2007/9/11 12:31
From Russia
Posts: 6928
|
@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.aThat 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:aa> gdb_6_3a_clib2 test_dwarf2
GNU gdb 6.3 (AmigaOS build 20050719)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered 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 (0x7fd4944c, xxx, 4, read, xxx) = 0
1 #include <stdio.h>
2 int main()
3 {
4 printf("asdfn");
5 }
(gdb) break 1
break 1
Breakpoint 1 at 0x7fd4944c: file test.c, line 1.
(gdb) r
r
Starting program: Work:aa/test_dwarf2
target_xfer_memory (0x7fd4944c, xxx, 4, read, xxx) = 4, bytes = 94 21 ff f0
target_xfer_memory (0x7fd4944c, xxx, 4, write, xxx) = 4, bytes = 7d 82 10 08
target_insert_breakpoint (0x7fd4944c, xxx) = 0
target_fetch_registers (pc) = 00000000 0x0 0
target_terminal_inferior ()
target_resume (-1, continue, 0)
target_wait (-1, status) = 1653873664, status->kind = stopped, signal = SIGBUS
target_fetch_registers (pc) = 023aecf0 0x23aecf0 37416176
target_terminal_ours_for_output ()
Program received signal SIGBUS, Bus error.
target_xfer_memory (0x7fd4944c, xxx, 4, write, xxx) = 4, bytes = 94 21 ff f0
target_remove_breakpoint (0x7fd4944c, xxx) = 0
target_terminal_ours ()
target_fetch_registers (r1) = 02249f90 0x2249f90 35954576
0x023aecf0 in ?? ()
target_create_inferior (Work:aa/test_dwarf2, , xxx, 1)
(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.1Now, 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:aa> gdb_751 test
GNU gdb (GDB) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "ppc-amigaos".
For bug reporting instructions, please 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), 0x62662488, 0x0, 0x10004d4, 4) = 4, bytes = 3d 20 01 00
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0x62662558, 0x0, 0x10004d4, 4) = 4, bytes = 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), 0x62662458, 0x0, 0x10004d4, 4) = 4, bytes = 3d 20 01 00
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0x626626d0, 0x0, 0x10004d4, 4) = 4, bytes =
3d 20 01 00
Breakpoint 1 at 0x10004d4: file test.c, line 1.
(gdb) r
r
Starting program: /Work/aa/test
[New process 1755977616]
target_thread_architecture (process 1755977616) = 0x61eb0018 [powerpc:common]
target_terminal_ours ()
../../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.
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? (y or n) [answered Y; input 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 *ops, enum target_object object,
const char *annex, gdb_byte *readbuf,
const gdb_byte *writebuf,
ULONGEST offset, LONGEST 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 (GDB) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to 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 instructions, please 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), 0x7fff9fd1f280, 0x0, 0x63a, 18) = 18, bytes =
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), 0x7fff9fd1f240, 0x0, 0x63a, 1) = 1, bytes =
55
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f280, 0x0, 0x63b, 3) = 3, bytes =
48 89 e5
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f3a0, 0x0, 0x63a, 18) = 18, bytes =
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), 0x7fff9fd1f360, 0x0, 0x63a, 1) = 1, bytes =
55
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f3a0, 0x0, 0x63b, 3) = 3, bytes =
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), 0x7fff9fd1f280, 0x0, 0x63a, 18) = 18, bytes =
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), 0x7fff9fd1f240, 0x0, 0x63a, 1) = 1, bytes =
55
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f280, 0x0, 0x63b, 3) = 3, bytes =
48 89 e5
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0x7fff9fd1f950, 0x0, 0x63e, 1) = 1, bytes =
48
Breakpoint 1 at 0x63e: file test.c, line 1.
(gdb) r
Starting program: /home/kas1e/work/gdb-7.5.1/gdb-build/gdb/test
target_wait (17726, status) = 17726, status->kind = stopped, signal = SIGTRAP
target_terminal_init ()
target_terminal_inferior ()
target_resume (17726, continue, 0)
target_wait (17726, status) = 17726, status->kind = stopped, signal = SIGTRAP
target_post_startup_inferior (17726)
target_create_inferior (/home/kas1e/work/gdb-7.5.1/gdb-build/gdb/test, , xxx, 1)
target_terminal_ours ()
child:target_xfer_partial (10, target.xml, 0x5652742ee400, 0x0, 0x0, 4095) = -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), 0x5652742f9880, 0x0, 0x0, 4096) = 320, bytes =
21 00 00 00 00 00 00 00 00 a0 ff f7 ff 7f 00 00 ...
child:target_xfer_partial (6, (null), 0x5652742f99c0, 0x0, 0x140, 3776) = 0
target_memory_map ()
child:target_xfer_partial (2, (null), 0x5652742fa890, 0x0, 0x555555554040, 504) = 504, bytes =
06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1ef10, 0x0, 0x55555555463a, 18) = 6, bytes =
55 48 89 e5 48 8d
child:target_xfer_partial (2, (null), 0x7fff9fd1ef16, 0x0, 0x555555554640, 12) = 8, bytes = 3d 9f 00 00 00 e8 c6 fe
child:target_xfer_partial (2, (null), 0x7fff9fd1ef1e, 0x0, 0x555555554648, 4) = 4, bytes = ff ff ...
child:target_xfer_partial (2, (null), 0x7fff9fd1eed0, 0x0, 0x55555555463a, 1) = 1, bytes =
55
child:target_xfer_partial (2, (null), 0x7fff9fd1ef10, 0x0, 0x55555555463b, 3) = 3, bytes =
48 89 e5
child:target_xfer_partial (2, (null), 0x7fff9fd1fa10, 0x0, 0x555555554040, 56) = 56, bytes =
06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa10, 0x0, 0x555555554078, 56) = 56, bytes =
03 00 00 00 04 00 00 00 38 02 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa10, 0x0, 0x5555555540b0, 56) = 56, bytes =
01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa10, 0x0, 0x5555555540e8, 56) = 56, bytes =
01 00 00 00 06 00 00 00 b8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa10, 0x0, 0x555555554120, 56) = 56, bytes =
02 00 00 00 06 00 00 00 c8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742faa90, 0x0, 0x555555754dc8, 496) = 496, bytes =
01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1faa0, 0x0, 0x555555754e90, 8) = 8, bytes =
00 00 00 00 00 00 00 00
child:target_xfer_partial (2, (null), 0x7fff9fd1fa10, 0x0, 0x555555554040, 56) = 56, bytes =
06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa10, 0x0, 0x555555554078, 56) = 56, bytes =
03 00 00 00 04 00 00 00 38 02 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa10, 0x0, 0x5555555540b0, 56) = 56, bytes =
01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa10, 0x0, 0x5555555540e8, 56) = 56, bytes =
01 00 00 00 06 00 00 00 b8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1fa10, 0x0, 0x555555554120, 56) = 56, bytes =
02 00 00 00 06 00 00 00 c8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742faa90, 0x0, 0x555555754dc8, 496) = 496, bytes =
01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1faa0, 0x0, 0x555555754e90, 8) = 8, bytes =
00 00 00 00 00 00 00 00
child:target_xfer_partial (2, (null), 0x7fff9fd1eff0, 0x0, 0x55555555463a, 18) = 6, bytes =
55 48 89 e5 48 8d
child:target_xfer_partial (2, (null), 0x7fff9fd1eff6, 0x0, 0x555555554640, 12) = 8, bytes = 3d 9f 00 00 00 e8 c6 fe
child:target_xfer_partial (2, (null), 0x7fff9fd1effe, 0x0, 0x555555554648, 4) = 4, bytes = ff ff ...
child:target_xfer_partial (2, (null), 0x7fff9fd1efb0, 0x0, 0x55555555463a, 1) = 1, bytes =
55
child:target_xfer_partial (2, (null), 0x7fff9fd1eff0, 0x0, 0x55555555463b, 3) = 3, bytes =
48 89 e5
target_close (0)
child:target_xfer_partial (2, (null), 0x7fff9fd1f0c0, 0x0, 0x55555555463a, 18) = 6, bytes =
55 48 89 e5 48 8d
child:target_xfer_partial (2, (null), 0x7fff9fd1f0c6, 0x0, 0x555555554640, 12) = 8, bytes = 3d 9f 00 00 00 e8 c6 fe
child:target_xfer_partial (2, (null), 0x7fff9fd1f0ce, 0x0, 0x555555554648, 4) = 4, bytes = ff ff ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f080, 0x0, 0x55555555463a, 1) = 1, bytes =
55
child:target_xfer_partial (2, (null), 0x7fff9fd1f0c0, 0x0, 0x55555555463b, 3) = 3, bytes =
48 89 e5
target_can_run () = 1
child:target_xfer_partial (2, (null), 0x7fff9fd1fab0, 0x0, 0x7ffff7ffa000, 64) = 64, bytes =
7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742ede50, 0x0, 0x7ffff7ffa040, 224) = 224, bytes =
01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742fb330, 0x0, 0x7ffff7ffa000, 5408) = 5408, bytes =
7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1ef00, 0x0, 0x55555555463a, 18) = 6, bytes =
55 48 89 e5 48 8d
child:target_xfer_partial (2, (null), 0x7fff9fd1ef06, 0x0, 0x555555554640, 12) = 8, bytes = 3d 9f 00 00 00 e8 c6 fe
child:target_xfer_partial (2, (null), 0x7fff9fd1ef0e, 0x0, 0x555555554648, 4) = 4, bytes = ff ff ...
child:target_xfer_partial (2, (null), 0x7fff9fd1eec0, 0x0, 0x55555555463a, 1) = 1, bytes =
55
child:target_xfer_partial (2, (null), 0x7fff9fd1ef00, 0x0, 0x55555555463b, 3) = 3, bytes =
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), 0x7fff9fd1fb70, 0x0, 0x55555555463e, 1) = 1, bytes =
48
child:target_xfer_partial (3, (null), 0x0, 0x565272cbd4a0, 0x55555555463e, 1) = 1, bytes =
cc
target_insert_breakpoint (0x000055555555463e, xxx) = 0
child:target_xfer_partial (2, (null), 0x7fff9fd1fb70, 0x0, 0x7ffff7de3f60, 1) = 1, bytes =
f3
child:target_xfer_partial (3, (null), 0x0, 0x565272cbd4a0, 0x7ffff7de3f60, 1) = 1, bytes =
cc
target_insert_breakpoint (0x00007ffff7de3f60, xxx) = 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 (-1, status) = 17726, status->kind = stopped, signal = 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), 0x7fff9fd1f410, 0x0, 0x555555554040, 56) = 56, bytes =
06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f410, 0x0, 0x555555554078, 56) = 56, bytes =
03 00 00 00 04 00 00 00 38 02 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f410, 0x0, 0x5555555540b0, 56) = 56, bytes =
01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f410, 0x0, 0x5555555540e8, 56) = 56, bytes =
01 00 00 00 06 00 00 00 b8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f410, 0x0, 0x555555554120, 56) = 56, bytes =
02 00 00 00 06 00 00 00 c8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742faa90, 0x0, 0x555555754dc8, 496) = 496, bytes =
01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4a0, 0x0, 0x555555754e90, 8) = 8, bytes =
40 e1 ff f7 ff 7f 00 00
child:target_xfer_partial (2, (null), 0x7fff9fd1f490, 0x0, 0x7ffff7ffe148, 8) = 8, bytes =
70 e1 ff f7 ff 7f 00 00
child:target_xfer_partial (2, (null), 0x5652742fb070, 0x0, 0x7ffff7ffe170, 40) = 40, bytes =
00 40 55 55 55 55 00 00 00 e7 ff f7 ff 7f 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742fadd0, 0x0, 0x7ffff7ffd9f0, 40) = 40, bytes =
00 30 dd f7 ff 7f 00 00 38 42 55 55 55 55 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x555555554238, 4) = 4, bytes = 2f 6c 69 62
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x55555555423c, 4) = 4, bytes = 36 34 2f 6c
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x555555554240, 4) = 4, bytes = 64 2d 6c 69
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x555555554244, 4) = 4, bytes = 6e 75 78 2d
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x555555554248, 4) = 4, bytes = 78 38 36 2d
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x55555555424c, 4) = 4, bytes = 36 34 2e 73
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x555555554250, 4) = 4, bytes = 6f 2e 32 00
child:target_xfer_partial (2, (null), 0x5652742f28e0, 0x0, 0x7ffff7ffe710, 40) = 40, bytes =
00 a0 ff f7 ff 7f 00 00 b0 eb ff f7 ff 7f 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffebb0, 4) = 4, bytes = 6c 69 6e 75
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffebb4, 4) = 4, bytes = 78 2d 76 64
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffebb8, 4) = 4, bytes = 73 6f 2e 73
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffebbc, 4) = 4, bytes = 6f 2e 31 00
child:target_xfer_partial (2, (null), 0x7fff9fd1f4e0, 0x0, 0x7ffff7ffe140, 4) = 4, bytes =
01 00 00 00
target_terminal_ours ()
warning: Could 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), 0x0, 0x5652742b0ad4, 0x55555555463e, 1) = 1, bytes = 48
target_remove_breakpoint (0x000055555555463e, xxx) = 0
child:target_xfer_partial (3, (null), 0x0, 0x5652742fb294, 0x7ffff7de3f60, 1) = 1, bytes = f3
target_remove_breakpoint (0x00007ffff7de3f60, xxx) = 0
target_thread_address_space (process 17726) = 1
target_terminal_inferior ()
target_pass_signals (0, { })
target_resume (17726, step, 0)
target_wait (-1, status) = 17726, status->kind = stopped, signal = 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), 0x7fff9fd1f5d0, 0x0, 0x55555555463e, 1) = 1, bytes =
48
child:target_xfer_partial (3, (null), 0x0, 0x565272cbd4a0, 0x55555555463e, 1) = 1, bytes =
cc
target_insert_breakpoint (0x000055555555463e, xxx) = 0
child:target_xfer_partial (2, (null), 0x7fff9fd1f5d0, 0x0, 0x7ffff7de3f60, 1) = 1, bytes =
f3
child:target_xfer_partial (3, (null), 0x0, 0x565272cbd4a0, 0x7ffff7de3f60, 1) = 1, bytes =
cc
target_insert_breakpoint (0x00007ffff7de3f60, xxx) = 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 (-1, status) = 17726, status->kind = stopped, signal = 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), 0x7fff9fd1f410, 0x0, 0x555555554040, 56) = 56, bytes =
06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f410, 0x0, 0x555555554078, 56) = 56, bytes =
03 00 00 00 04 00 00 00 38 02 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f410, 0x0, 0x5555555540b0, 56) = 56, bytes =
01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f410, 0x0, 0x5555555540e8, 56) = 56, bytes =
01 00 00 00 06 00 00 00 b8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f410, 0x0, 0x555555554120, 56) = 56, bytes =
02 00 00 00 06 00 00 00 c8 0d 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742faa90, 0x0, 0x555555754dc8, 496) = 496, bytes =
01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f4a0, 0x0, 0x555555754e90, 8) = 8, bytes =
40 e1 ff f7 ff 7f 00 00
child:target_xfer_partial (2, (null), 0x7fff9fd1f490, 0x0, 0x7ffff7ffe148, 8) = 8, bytes =
70 e1 ff f7 ff 7f 00 00
child:target_xfer_partial (2, (null), 0x5652742f7c50, 0x0, 0x7ffff7ffe170, 40) = 40, bytes =
00 40 55 55 55 55 00 00 00 e7 ff f7 ff 7f 00 00 ...
child:target_xfer_partial (2, (null), 0x5652742f28e0, 0x0, 0x7ffff7ffe710, 40) = 40, bytes =
00 a0 ff f7 ff 7f 00 00 b0 eb ff f7 ff 7f 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffebb0, 4) = 4, bytes = 6c 69 6e 75
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffebb4, 4) = 4, bytes = 78 2d 76 64
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffebb8, 4) = 4, bytes = 73 6f 2e 73
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffebbc, 4) = 4, bytes = 6f 2e 31 00
child:target_xfer_partial (2, (null), 0x5652742f7c50, 0x0, 0x7ffff7fd5000, 40) = 40, bytes =
00 20 9e f7 ff 7f 00 00 d0 ed ff f7 ff 7f 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffedd0, 4) = 4, bytes = 2f 6c 69 62
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffedd4, 4) = 4, bytes = 2f 78 38 36
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffedd8, 4) = 4, bytes = 5f 36 34 2d
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffeddc, 4) = 4, bytes = 6c 69 6e 75
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffede0, 4) = 4, bytes = 78 2d 67 6e
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffede4, 4) = 4, bytes = 75 2f 6c 69
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffede8, 4) = 4, bytes = 62 63 2e 73
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x7ffff7ffedec, 4) = 4, bytes = 6f 2e 36 00
child:target_xfer_partial (2, (null), 0x5652742e7390, 0x0, 0x7ffff7ffd9f0, 40) = 40, bytes =
00 30 dd f7 ff 7f 00 00 38 42 55 55 55 55 00 00 ...
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x555555554238, 4) = 4, bytes = 2f 6c 69 62
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x55555555423c, 4) = 4, bytes = 36 34 2f 6c
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x555555554240, 4) = 4, bytes = 64 2d 6c 69
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x555555554244, 4) = 4, bytes = 6e 75 78 2d
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x555555554248, 4) = 4, bytes = 78 38 36 2d
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x55555555424c, 4) = 4, bytes = 36 34 2e 73
child:target_xfer_partial (2, (null), 0x7fff9fd1f454, 0x0, 0x555555554250, 4) = 4, bytes = 6f 2e 32 00
child:target_xfer_partial (2, (null), 0x7fff9fd1f4e0, 0x0, 0x7ffff7ffe140, 4) = 4, bytes =
01 00 00 00
child:target_xfer_partial (2, (null), 0x7fff9fd1e9f0, 0x0, 0x55555555463a, 18) = 6, bytes =
55 48 89 e5 48 8d
child:target_xfer_partial (2, (null), 0x7fff9fd1e9f6, 0x0, 0x555555554640, 12) = 8, bytes = 3d 9f 00 00 00 e8 c6 fe
child:target_xfer_partial (2, (null), 0x7fff9fd1e9fe, 0x0, 0x555555554648, 4) = 4, bytes = ff ff ...
child:target_xfer_partial (2, (null), 0x7fff9fd1e9b0, 0x0, 0x55555555463a, 1) = 1, bytes =
55
child:target_xfer_partial (2, (null), 0x7fff9fd1e9f0, 0x0, 0x55555555463b, 3) = 3, bytes =
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), 0x0, 0x5652742ee4a4, 0x55555555463e, 1) = 1, bytes = 48
target_remove_breakpoint (0x000055555555463e, xxx) = 0
child:target_xfer_partial (3, (null), 0x0, 0x5652742fb294, 0x7ffff7de3f60, 1) = 1, bytes = f3
target_remove_breakpoint (0x00007ffff7de3f60, xxx) = 0
target_thread_address_space (process 17726) = 1
target_terminal_inferior ()
target_pass_signals (0, { })
target_resume (17726, step, 0)
target_wait (-1, status) = 17726, status->kind = stopped, signal = 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), 0x7fff9fd1f5d0, 0x0, 0x55555555463e, 1) = 1, bytes =
48
child:target_xfer_partial (3, (null), 0x0, 0x565272cbd4a0, 0x55555555463e, 1) = 1, bytes =
cc
target_insert_breakpoint (0x000055555555463e, xxx) = 0
child:target_xfer_partial (2, (null), 0x7fff9fd1f5d0, 0x0, 0x7ffff7de3f60, 1) = 1, bytes =
f3
child:target_xfer_partial (3, (null), 0x0, 0x565272cbd4a0, 0x7ffff7de3f60, 1) = 1, bytes =
cc
target_insert_breakpoint (0x00007ffff7de3f60, xxx) = 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 (-1, status) = 17726, status->kind = stopped, signal = 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), 0x0, 0x5652742ee4a4, 0x55555555463e, 1) = 1, bytes = 48
target_remove_breakpoint (0x000055555555463e, xxx) = 0
child:target_xfer_partial (3, (null), 0x0, 0x5652742fb294, 0x7ffff7de3f60, 1) = 1, bytes = f3
target_remove_breakpoint (0x00007ffff7de3f60, xxx) = 0
target_terminal_ours ()
target_thread_address_space (process 17726) = 1
target_thread_address_space (process 17726) = 1
child:target_xfer_partial (2, (null), 0x7fff9fd1faf7, 0x0, 0x55555555463e, 1) = 1, bytes = 48
child:target_xfer_partial (2, (null), 0x7fff9fd1faf7, 0x0, 0x55555555463e, 1) = 1, bytes = 48
child:target_xfer_partial (3, (null), 0x565274335d5c, 0x0, 0x7fffffffde80, 64) = 64, bytes = 60 46 55 55 ...
child:target_xfer_partial (4, (null), 0x5652742f9820, 0x0, 0x7fffffffdea8, 8) = 8, bytes =
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 (t = current_target.beneath; t != NULL; t = t->beneath)
{
if (t->to_thread_address_space != NULL)
{
aspace = t->to_thread_address_space (t, ptid);
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
|
|
|
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).
|
|
|
Re: GDB |
Posted on: 2/27 22:01
#90 |
Home away from home 
Joined: 2007/9/11 12:31
From Russia
Posts: 6928
|
@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 (GDB) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to 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 instructions, please 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), 0xffec32d8, 0x0, 0x63c, 4) = 4, bytes = 80 7e 80 00
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0xffec33c8, 0x0, 0x63c, 4) = 4, bytes = 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), 0xffec32d8, 0x0, 0x63c, 4) = 4, bytes = 80 7e 80 00
target_get_section_table ()
exec:target_xfer_partial (2, (null), 0xffec3600, 0x0, 0x63c, 4) = 4, bytes =
80 7e 80 00
Breakpoint 1 at 0x63c: file test.c, line 1.
(gdb) r
Starting program: /root/work/gdb-7.5.1/gdb-build/test
target_wait (27384, status) = 27384, status->kind = stopped, signal = SIGTRAP
target_terminal_init ()
target_terminal_inferior ()
target_resume (27384, continue, 0)
target_wait (27384, status) = 27384, status->kind = stopped, signal = SIGTRAP
target_post_startup_inferior (27384)
target_create_inferior (/root/work/gdb-7.5.1/gdb-build/test, , xxx, 1)
target_terminal_ours ()
child:target_xfer_partial (10, target.xml, 0x1576ee0, 0x0, 0x0, 4095) = -1
child:target_xfer_partial (6, (null), 0x1576ee0, 0x0, 0x0, 4096) = 288, bytes =
00 00 00 16 00 00 00 16 00 00 00 16 00 00 00 16 ...
child:target_xfer_partial (6, (null), 0x1577000, 0x0, 0x120, 3808) = 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), 0x154f5e0, 0x0, 0x400034, 288) = 288, bytes =
00 00 00 06 00 00 00 34 00 00 00 34 00 00 00 34 ...
child:target_xfer_partial (2, (null), 0xffec2f78, 0x0, 0x40063c, 4) = 4, bytes = 80 7e 80 00
child:target_xfer_partial (2, (null), 0xffec35f8, 0x0, 0x400034, 32) = 32, bytes = 00 00 00 06 00 00 00 34 ...
child:target_xfer_partial (2, (null), 0xffec35f8, 0x0, 0x400054, 32) = 32, bytes = 00 00 00 03 00 00 01 54 ...
child:target_xfer_partial (2, (null), 0xffec35f8, 0x0, 0x400074, 32) = 32, bytes = 00 00 00 01 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0xffec35f8, 0x0, 0x400094, 32) = 32, bytes = 00 00 00 01 00 00 fe c8 ...
child:target_xfer_partial (2, (null), 0xffec35f8, 0x0, 0x4000b4, 32) = 32, bytes = 00 00 00 02 00 00 fe f8 ...
child:target_xfer_partial (2, (null), 0x157a770, 0x0, 0x41fef8, 248) = 248, bytes =
00 00 00 01 00 00 00 01 00 00 00 0c 00 00 04 40 ...
child:target_xfer_partial (2, (null), 0xffec3678, 0x0, 0x41ff5c, 4) = 4, bytes = 00 00 00 00
child:target_xfer_partial (2, (null), 0xffec35f8, 0x0, 0x400034, 32) = 32, bytes = 00 00 00 06 00 00 00 34 ...
child:target_xfer_partial (2, (null), 0xffec35f8, 0x0, 0x400054, 32) = 32, bytes = 00 00 00 03 00 00 01 54 ...
child:target_xfer_partial (2, (null), 0xffec35f8, 0x0, 0x400074, 32) = 32, bytes = 00 00 00 01 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0xffec35f8, 0x0, 0x400094, 32) = 32, bytes = 00 00 00 01 00 00 fe c8 ...
child:target_xfer_partial (2, (null), 0xffec35f8, 0x0, 0x4000b4, 32) = 32, bytes = 00 00 00 02 00 00 fe f8 ...
child:target_xfer_partial (2, (null), 0x157a770, 0x0, 0x41fef8, 248) = 248, bytes =
00 00 00 01 00 00 00 01 00 00 00 0c 00 00 04 40 ...
child:target_xfer_partial (2, (null), 0xffec3678, 0x0, 0x41ff5c, 4) = 4, bytes = 00 00 00 00
child:target_xfer_partial (2, (null), 0xffec3078, 0x0, 0x40063c, 4) = 4, bytes = 80 7e 80 00
target_close (0)
child:target_xfer_partial (2, (null), 0xffec3138, 0x0, 0x40063c, 4) = 4, bytes = 80 7e 80 00
target_can_run () = 1
child:target_xfer_partial (2, (null), 0xffec36e8, 0x0, 0x100000, 52) = 52, bytes = 7f 45 4c 46 01 02 01 00 ...
child:target_xfer_partial (2, (null), 0x1530930, 0x0, 0x100034, 128) = 128, bytes =
00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0x1580990, 0x0, 0x100000, 5604) = 5604, bytes =
7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0xffec2fe8, 0x0, 0x40063c, 4) = 4, bytes = 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), 0xffec3700, 0x0, 0x40063c, 4) = 4, bytes =
80 7e 80 00
child:target_xfer_partial (3, (null), 0x0, 0xf51450, 0x40063c, 4) = 4, bytes =
7d 82 10 08
target_insert_breakpoint (0x000000000040063c, xxx) = 0
child:target_xfer_partial (2, (null), 0xffec3700, 0x0, 0xf7fcf0d0, 4) = 4, bytes =
4e 80 00 20
child:target_xfer_partial (3, (null), 0x0, 0xf51450, 0xf7fcf0d0, 4) = 4, bytes =
7d 82 10 08
target_insert_breakpoint (0x00000000f7fcf0d0, xxx) = 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 (-1, status) = 27384, status->kind = stopped, signal = 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), 0xffec3238, 0x0, 0x400034, 32) = 32, bytes = 00 00 00 06 00 00 00 34 ...
child:target_xfer_partial (2, (null), 0xffec3238, 0x0, 0x400054, 32) = 32, bytes = 00 00 00 03 00 00 01 54 ...
child:target_xfer_partial (2, (null), 0xffec3238, 0x0, 0x400074, 32) = 32, bytes = 00 00 00 01 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0xffec3238, 0x0, 0x400094, 32) = 32, bytes = 00 00 00 01 00 00 fe c8 ...
child:target_xfer_partial (2, (null), 0xffec3238, 0x0, 0x4000b4, 32) = 32, bytes = 00 00 00 02 00 00 fe f8 ...
child:target_xfer_partial (2, (null), 0x157a770, 0x0, 0x41fef8, 248) = 248, bytes =
00 00 00 01 00 00 00 01 00 00 00 0c 00 00 04 40 ...
child:target_xfer_partial (2, (null), 0xffec32b8, 0x0, 0x41ff5c, 4) = 4, bytes = f7 ff e9 0c
child:target_xfer_partial (2, (null), 0xffec32e0, 0x0, 0xf7ffe910, 4) = 4, bytes =
f7 ff e9 20
child:target_xfer_partial (2, (null), 0x157e510, 0x0, 0xf7ffe920, 20) = 20, bytes =
00 40 00 00 f7 ff ec 10 00 41 fe f8 f7 ff e5 38 ...
child:target_xfer_partial (2, (null), 0x157e510, 0x0, 0xf7ffe538, 20) = 20, bytes =
f7 fb e0 00 00 40 01 54 f7 ff d7 0c f7 ff ec 20 ...
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0x400154, 4) = 4, bytes = 2f 6c 69 62
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0x400158, 4) = 4, bytes = 2f 6c 64 2e
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0x40015c, 4) = 4, bytes = 73 6f 2e 31
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0x400160, 4) = 4, bytes = 00 00 00 00
child:target_xfer_partial (2, (null), 0x157e510, 0x0, 0xf7ffec20, 20) = 20, bytes =
00 10 00 00 f7 ff ee a0 00 10 0e b4 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffeea0, 4) = 4, bytes = 6c 69 6e 75
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffeea4, 4) = 4, bytes = 78 2d 76 64
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffeea8, 4) = 4, bytes = 73 6f 33 32
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffeeac, 4) = 4, bytes = 2e 73 6f 2e
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffeeb0, 4) = 4, bytes = 31 00 00 00
child:target_xfer_partial (2, (null), 0xffec3308, 0x0, 0xf7ffe90c, 4) = 4, bytes = 00 00 00 01
target_terminal_ours ()
warning: Could 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), 0xffec33b8, 0x0, 0x40063c, 4) = 4, bytes = 7d 82 10 08
child:target_xfer_partial (3, (null), 0x0, 0x15a07bc, 0x40063c, 4) = 4, bytes = 80 7e 80 00
target_remove_breakpoint (0x000000000040063c, xxx) = 0
child:target_xfer_partial (2, (null), 0xffec33b8, 0x0, 0xf7fcf0d0, 4) = 4, bytes = 7d 82 10 08
child:target_xfer_partial (3, (null), 0x0, 0x151435c, 0xf7fcf0d0, 4) = 4, bytes = 4e 80 00 20
target_remove_breakpoint (0x00000000f7fcf0d0, xxx) = 0
target_thread_address_space (process 27384) = 1
child:target_xfer_partial (2, (null), 0xffec3388, 0x0, 0xf7fcf0d0, 4) = 4, bytes = 4e 80 00 20
target_terminal_inferior ()
target_pass_signals (0, { })
target_resume (27384, step, 0)
target_wait (-1, status) = 27384, status->kind = stopped, signal = 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), 0xffec3390, 0x0, 0x40063c, 4) = 4, bytes =
80 7e 80 00
child:target_xfer_partial (3, (null), 0x0, 0xf51450, 0x40063c, 4) = 4, bytes =
7d 82 10 08
target_insert_breakpoint (0x000000000040063c, xxx) = 0
child:target_xfer_partial (2, (null), 0xffec3390, 0x0, 0xf7fcf0d0, 4) = 4, bytes =
4e 80 00 20
child:target_xfer_partial (3, (null), 0x0, 0xf51450, 0xf7fcf0d0, 4) = 4, bytes =
7d 82 10 08
target_insert_breakpoint (0x00000000f7fcf0d0, xxx) = 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 (-1, status) = 27384, status->kind = stopped, signal = 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), 0xffec3238, 0x0, 0x400034, 32) = 32, bytes = 00 00 00 06 00 00 00 34 ...
child:target_xfer_partial (2, (null), 0xffec3238, 0x0, 0x400054, 32) = 32, bytes = 00 00 00 03 00 00 01 54 ...
child:target_xfer_partial (2, (null), 0xffec3238, 0x0, 0x400074, 32) = 32, bytes = 00 00 00 01 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0xffec3238, 0x0, 0x400094, 32) = 32, bytes = 00 00 00 01 00 00 fe c8 ...
child:target_xfer_partial (2, (null), 0xffec3238, 0x0, 0x4000b4, 32) = 32, bytes = 00 00 00 02 00 00 fe f8 ...
child:target_xfer_partial (2, (null), 0x157a770, 0x0, 0x41fef8, 248) = 248, bytes =
00 00 00 01 00 00 00 01 00 00 00 0c 00 00 04 40 ...
child:target_xfer_partial (2, (null), 0xffec32b8, 0x0, 0x41ff5c, 4) = 4, bytes = f7 ff e9 0c
child:target_xfer_partial (2, (null), 0xffec32e0, 0x0, 0xf7ffe910, 4) = 4, bytes =
f7 ff e9 20
child:target_xfer_partial (2, (null), 0x15a1e00, 0x0, 0xf7ffe920, 20) = 20, bytes =
00 40 00 00 f7 ff ec 10 00 41 fe f8 f7 ff ec 20 ...
child:target_xfer_partial (2, (null), 0x15a1e00, 0x0, 0xf7ffec20, 20) = 20, bytes =
00 10 00 00 f7 ff ee a0 00 10 0e b4 f7 fe 70 00 ...
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffeea0, 4) = 4, bytes = 6c 69 6e 75
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffeea4, 4) = 4, bytes = 78 2d 76 64
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffeea8, 4) = 4, bytes = 73 6f 33 32
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffeeac, 4) = 4, bytes = 2e 73 6f 2e
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffeeb0, 4) = 4, bytes = 31 00 00 00
child:target_xfer_partial (2, (null), 0x15a1e00, 0x0, 0xf7fe7000, 20) = 20, bytes =
00 20 c0 00 f7 ff ef b0 00 3e 98 7c f7 ff e5 38 ...
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffefb0, 4) = 4, bytes = 2f 6c 69 62
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffefb4, 4) = 4, bytes = 2f 70 6f 77
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffefb8, 4) = 4, bytes = 65 72 70 63
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffefbc, 4) = 4, bytes = 2d 6c 69 6e
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffefc0, 4) = 4, bytes = 75 78 2d 67
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffefc4, 4) = 4, bytes = 6e 75 2f 6c
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffefc8, 4) = 4, bytes = 69 62 63 2e
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffefcc, 4) = 4, bytes = 73 6f 2e 36
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0xf7ffefd0, 4) = 4, bytes = 00 00 00 00
child:target_xfer_partial (2, (null), 0x15a1e00, 0x0, 0xf7ffe538, 20) = 20, bytes =
f7 fb e0 00 00 40 01 54 f7 ff d7 0c 00 00 00 00 ...
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0x400154, 4) = 4, bytes = 2f 6c 69 62
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0x400158, 4) = 4, bytes = 2f 6c 64 2e
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0x40015c, 4) = 4, bytes = 73 6f 2e 31
child:target_xfer_partial (2, (null), 0xffec3298, 0x0, 0x400160, 4) = 4, bytes = 00 00 00 00
child:target_xfer_partial (2, (null), 0xffec3308, 0x0, 0xf7ffe90c, 4) = 4, bytes = 00 00 00 01
child:target_xfer_partial (2, (null), 0xffec2cb8, 0x0, 0x40063c, 4) = 4, bytes = 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), 0xffec33b8, 0x0, 0x40063c, 4) = 4, bytes = 7d 82 10 08
child:target_xfer_partial (3, (null), 0x0, 0x155c32c, 0x40063c, 4) = 4, bytes = 80 7e 80 00
target_remove_breakpoint (0x000000000040063c, xxx) = 0
child:target_xfer_partial (2, (null), 0xffec33b8, 0x0, 0xf7fcf0d0, 4) = 4, bytes = 7d 82 10 08
child:target_xfer_partial (3, (null), 0x0, 0x151435c, 0xf7fcf0d0, 4) = 4, bytes = 4e 80 00 20
target_remove_breakpoint (0x00000000f7fcf0d0, xxx) = 0
target_thread_address_space (process 27384) = 1
child:target_xfer_partial (2, (null), 0xffec3388, 0x0, 0xf7fcf0d0, 4) = 4, bytes = 4e 80 00 20
target_terminal_inferior ()
target_pass_signals (0, { })
target_resume (27384, step, 0)
target_wait (-1, status) = 27384, status->kind = stopped, signal = 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), 0xffec3390, 0x0, 0x40063c, 4) = 4, bytes =
80 7e 80 00
child:target_xfer_partial (3, (null), 0x0, 0xf51450, 0x40063c, 4) = 4, bytes =
7d 82 10 08
target_insert_breakpoint (0x000000000040063c, xxx) = 0
child:target_xfer_partial (2, (null), 0xffec3390, 0x0, 0xf7fcf0d0, 4) = 4, bytes =
4e 80 00 20
child:target_xfer_partial (3, (null), 0x0, 0xf51450, 0xf7fcf0d0, 4) = 4, bytes =
7d 82 10 08
target_insert_breakpoint (0x00000000f7fcf0d0, xxx) = 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 (-1, status) = 27384, status->kind = stopped, signal = 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), 0xffec3708, 0x0, 0x40063c, 4) = 4, bytes = 7d 82 10 08
child:target_xfer_partial (3, (null), 0x0, 0x155c32c, 0x40063c, 4) = 4, bytes = 80 7e 80 00
target_remove_breakpoint (0x000000000040063c, xxx) = 0
child:target_xfer_partial (2, (null), 0xffec3708, 0x0, 0xf7fcf0d0, 4) = 4, bytes = 7d 82 10 08
child:target_xfer_partial (3, (null), 0x0, 0x151435c, 0xf7fcf0d0, 4) = 4, bytes = 4e 80 00 20
target_remove_breakpoint (0x00000000f7fcf0d0, xxx) = 0
target_terminal_ours ()
target_thread_address_space (process 27384) = 1
target_thread_address_space (process 27384) = 1
child:target_xfer_partial (2, (null), 0xffec3688, 0x0, 0x40063c, 4) = 4, bytes = 80 7e 80 00
child:target_xfer_partial (2, (null), 0xffec3688, 0x0, 0x400638, 4) = 4, bytes = 3b de 78 bc
child:target_xfer_partial (2, (null), 0xffec3688, 0x0, 0x40063c, 4) = 4, bytes = 80 7e 80 00
child:target_xfer_partial (2, (null), 0xffec3688, 0x0, 0x400638, 4) = 4, bytes = 3b de 78 bc
target_fetch_registers (r31) = ffffe690 0xffffe690 4294960784
child:target_xfer_partial (3, (null), 0x153cd54, 0x0, 0xffffe680, 64) = 64, bytes = ff ff e6 a0 00 00 00 00 00 40 06 14 ...
child:target_xfer_partial (4, (null), 0x1580290, 0x0, 0xffffe6a4, 4) = 4, bytes =
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 ?:)
|
|
|
Re: GDB |
|
Just popping in 
Joined: 2011/7/20 20:01
From In the sticks
Posts: 167
|
Sorry I've been away from this for a few days, I should now have a chance to catch up.
|
|
|
Re: GDB |
|
Home away from home 
Joined: 2007/9/11 12:31
From Russia
Posts: 6928
|
@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;
|
|
|
Re: GDB |
|
Home away from home 
Joined: 2007/9/11 12:31
From Russia
Posts: 6928
|
@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
|
|
|
Re: GDB |
|
Just popping in 
Joined: 2011/7/20 20:01
From In the sticks
Posts: 167
|
@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
|
|
|
Re: GDB |
|
Just popping in 
Joined: 2006/11/30 11:59
From Lund, Sweden
Posts: 137
|
@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 :)
|
|
|
Re: GDB |
|
Home away from home 
Joined: 2007/9/11 12:31
From Russia
Posts: 6928
|
@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
|
|
|
Re: GDB |
|
Just popping in 
Joined: 2011/7/20 20:01
From In the sticks
Posts: 167
|
@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.
|
|
|
Re: GDB |
|
Home away from home 
Joined: 2007/9/11 12:31
From Russia
Posts: 6928
|
@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
|
|
|
Re: GDB |
|
Just popping in 
Joined: 2011/7/20 20:01
From In the sticks
Posts: 167
|
@kas1e
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.
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.
|
|
|
Re: GDB |
Posted on: 3/8 18:35
#100 |
Home away from home 
Joined: 2007/9/11 12:31
From Russia
Posts: 6928
|
@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
|
|
|