View Single Post
Old 04 February 2020, 20:03   #61
JuanLuis
Registered User
 
Join Date: Dec 2018
Location: Málaga
Posts: 61
Quote:
Originally Posted by bebbo View Post
learn gdb - first lesson: how to set a break point.
watch closely:
Code:
stefan@ZETRA:~/amiga-gcc/tickets/eab7$ m68k-amigaos-g++ -g test7.c -o test7
stefan@ZETRA:~/amiga-gcc/tickets/eab7$ m68k-amigaos-strip test7 -o /mnt/c/Amiga/MyWB31/Develop/prj/test/test7



WINUAE: bgdbserver test7



stefan@ZETRA:~/amiga-gcc/tickets/eab7$ m68k-amigaos-gdb test7
GNU gdb (GDB) 8.3.50.200102-195310-git
Copyright (C) 2019 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 "--host=x86_64-pc-linux-gnu --target=m68k-amigaos".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from test7...
(gdb) target remote :2345
Remote debugging using :2345
warning: Target reported unsupported offsets: Text=4062b0e0;Data=4059fb50;Bss=4059ff68
0x4062b0e0 in _stext ()
(gdb) list
1       #include <stdio.h>
2
3       int main(int argc, char** argv) {
4           for (int i = 0; i < argc; i++)
5               printf("Arg #%d -> \"%s\"\n", i, argv[i]);
6                       
7           return 0;
8       }
9
(gdb) b main:4
Breakpoint 1 at 0x4062b316: file test7.c, line 4.
(gdb) c
Continuing.

Breakpoint 1, main (argc=1, argv=0x4059ff68) at test7.c:4
4           for (int i = 0; i < argc; i++)
(gdb) c
Continuing.

Program terminated with signal SIGKILL, Killed.
The program no longer exists.
(gdb)

so use
b main:4
instead of
b 4
Same thing happens. Please, take a look on the attached pictures. I'm using your precompiled bgdbserver from your page:
https://github.com/bebbo/bgdbserver

Mi bdbserver executable has 20.888 bytes. Its sha256 is:
$ sha256sum bgdbserver
d327eb58fc4f0c537ded73a54159a157c84d6ffb4cd0a2837a2ffb12b957cdd0 *bgdbserver


Should I compile bgdbserver for amiga from your source code instead of using your precompiled version?

Other suspicious thing is that argument values are wrong. When I enable -g on linking is like -noixemul was ignored. The problem I was talking about on the other thread appears again.

Do you think my m68k-gdb has a problem?

Am I doing something else wrong?

Thanks.
Attached Thumbnails
Click image for larger version

Name:	Amiga Debugging.jpg
Views:	223
Size:	433.9 KB
ID:	66094   Click image for larger version

Name:	m68k-amigaos-gdb.jpg
Views:	186
Size:	350.3 KB
ID:	66095  
JuanLuis is offline  
 
Page generated in 0.04351 seconds with 12 queries