Remember me

Lost Password?

Register now!


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

Members: 0
Guests: 74



Report message:*


Subject: Re: GDB
by kas1e on 2021/2/18 13:14:26


Was it Thomas that did the work on the current GDB?

Back in times: yes. But after him land diffs to adtools repo, Sebastian do some changes on as well.

Thomas says he surely have no time to work on GDB for sure, but he can help us with all kind of technical info and help and necessary kernel tests/fixes, we just need to start somewhere.

For example, right now we probably need to check "is debug interrupt works on x5000 at all" the same as on peg2 for example.

On Morphos/x5000 GDB surely works as expected , see:


Ram Disk:> gdb -q test
Reading symbols from test...
(gdb) list
1 #include <stdio.h>
2 int main()
3 {
4 printf("asdfasdfn");
5 }
(gdb) break 4
Breakpoint 1 at 0x7d8: file test.cpp, line 4.
(gdb) r
Starting program: /RAM/test
[New Task 0x180c8530]

Breakpoint 1, main () at test.cpp:4
4 printf("asdfasdfn");
(gdb) disas
Dump of assembler code for function main:
0x183c6454 <+0>: stwu r1,-16(r1)
0x183c6458 <+4>: mflr r0
0x183c645c <+8>: stw r0,20(r1)
0x183c6460 <+12>: stw r31,12(r1)
0x183c6464 <+16>: mr r31,r1
=> 0x183c6468 <+20>: lis r9,6160
0x183c646c <+24>: addi r3,r9,29448
0x183c6470 <+28>: crclr 4*cr1+eq
0x183c6474 <+32>: bl 0x183c64fc <printf>
0x183c6478 <+36>: li r9,0
0x183c647c <+40>: mr r3,r9
0x183c6480 <+44>: addi r11,r31,16
0x183c6484 <+48>: lwz r0,4(r11)
0x183c6488 <+52>: mtlr r0
0x183c648c <+56>: lwz r31,-4(r11)
0x183c6490 <+60>: mr r1,r11
0x183c6494 <+64>: blr
End of assembler dump.

On x5000/aos4 we have that:


3/0.RAM Disk:> gdb -q test
(gdb) list
1 #include <stdio.h>
2 int main()
3 {
4 printf("asfasdf\n");
5 }
(gdb) break 4
Breakpoint 1 at 0x7fd49460: file test.cpp, line 4.
(gdb) r
Starting program: /RAM Disk/test

Program received signal SIGBUS, Bus error.
0x023aecf0 in ?? ()
(gdb) disas
No function contains a program counter for the selected frame.


I.e. break can be set, listing works, it just TRAP seems broken ?

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project