Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
59 user(s) are online (46 user(s) are browsing Forums)

Members: 0
Guests: 59

more...

Support us!

Headlines

 
  Register To Post  

« 1 2 (3) 4 5 6 »
Re: DEbug 101
Just can't stay away
Just can't stay away


See User information
@sba

Yes, of course. You have my permission to add the existing code to adtools if you want.

Go to top
Re: DEbug 101
Just can't stay away
Just can't stay away


See User information
@Hans

and make that API an arexx port too

Go to top
Re: DEbug 101
Just can't stay away
Just can't stay away


See User information
@JosDuchIt

One arexx port comming up...

Go to top
Re: DEbug 101
Just can't stay away
Just can't stay away


See User information
@alfkil

New version of db101 has been uploaded. See original post.


Edited by alfkil on 2010/9/20 18:49:50
Go to top
Re: DEbug 101
Quite a regular
Quite a regular


See User information
@alfkil

first test (don't worry

Hum, Just remember that testing on AOS4.1U2 not work fine.
Verry sorry......

Just for curiosity


Executable section (0x1000074/3760392 bytes) starts at 0x6efef020
Relocating section ".stab" (index 23) which is referred by section ".rela.stab" (index 24)

and a DSI:

Crash log for task "db101"
Generated by GrimReaper 53.2
Crash occured in module elf.library.kmod at address 0x015320F8
Type of crash: DSI (Data Storage Interrupt) exception

Register dump:
GPR (General Purpose Registers):
0: 0001656C 5975C5B0 00000000 00E41D3C 01529FEC 01503924 01503924 00000000
8: 00B30000 0000000C 00B30000 014154A8 24002048 5995D8B0 00000000 5A8C3EBC
16: 58B9A22C 58E7BBE0 5B454680 01CA97C4 00000000 58E7C940 58B97344 5A8C31D4
24: 5B454680 5975C608 00000000 80000001 00000000 58E7BBE0 0152B6F4 59669C40


FPR (Floating Point Registers, NaN = Not a Number):
0: nan 2.45825e+24 1.64779e+93 3.15834e+231
4: 3.91208e+107 1.06281e+94 9.92552e+170 7.51825e+199
8: 3.15637e+21 4.91013e+252 2.16225e-307 1.26282e+200
12: 6.97271e+228 1.75792e+199 0 0
16: 0 0 0 0
20: 0 0 0 0
24: 0 0 0 0
28: 1.04023e-162 0 0 0

FPSCR (Floating Point Status and Control Register): 0x82000000


SPRs (Special Purpose Registers):
Machine State (msr) : 0x0002F030
Condition (cr) : 0x44002042
Instruction Pointer (ip) : 0x015320F8
Xtended Exception (xer) : 0x20000008
Count (ctr) : 0x014154A8
Link (lr) : 0x015320F0
DSI Status (dsisr) : 0x00000000
Data Address (dar) : 0x00000008



680x0 emulated registers:
DATA: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ADDR: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
FPU0: 0 0 0 0
FPU4: 0 0 0 0



Symbol info:
Instruction pointer 0x015320F8 belongs to module "elf.library.kmod" (HUNK/Kickstart)

Stack trace:
native kernel module elf.library.kmod+0x000081f8
native kernel module elf.library.kmod+0x000026e8
native kernel module elf.library.kmod+0x000061f4
db101:amigaos_relocate_elfhandle()+0x384 (section 1 @ 0x914)
db101:load_inferior()+0x47C (section 1 @ 0xe14)
db101:gui()+0x1260 (section 1 @ 0x3a90)
db101:main()+0x24 (section 1 @ 0x1608)
native kernel module newlib.library.kmod+0x00001f4c
native kernel module newlib.library.kmod+0x00002be0
native kernel module newlib.library.kmod+0x00002d5c
db101:_start()+0x170 (section 1 @ 0x170)
native kernel module dos.library.kmod+0x0001b524
native kernel module kernel+0x00036290
native kernel module kernel+0x00036310


PPC disassembly:
015320f0: 813d0024 lwz r9,36(r29)
015320f4: 801f0030 lwz r0,48(r31)
*015320f8: 817c0008 lwz r11,8(r28)
015320fc: 7c004b96 divwu r0,r0,r9
01532100: 935c0004 stw r26,4(r28)

A1200+Mediator+VooDoo3+060/50+96mo+IIYAMA 17"+CD,CDRW,ZIP SCSI-KIT
SAM440EP on Mapower 3000+AOS4.1

Amiga Docs Disk Preservation Project
Go to top
Re: DEbug 101
Home away from home
Home away from home


See User information
@alfkil

Nice ! But it pretty unposible to do more or less good tests because of that elf.kmod bug :( Maybe you can include working verstion of elf.kmod to archive ?

Anyway, what i can test before i get a lockup : windowses lock the main window. I.e. you spawn register-info window, and you cant press on breakpoint for example (but when you close register window, then breakpoints auto-pressed). The same for hexviewer.

Good progress all in all :)

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: DEbug 101
Just can't stay away
Just can't stay away


See User information
@kas1e

Yes, I need to redesign the user-interface once I've added all the features.

Go to top
Re: DEbug 101
Just can't stay away
Just can't stay away


See User information
@alfkil

Hehe, coding is like playing Myst: You have to look in the woods for the right code that opens the Vault etc...

I have uploaded a fresh version of db101 with just a few small additions. There are still many things on my list to do (like an arexx port and stack traces), but at this point I feel I need some feedback and a little motivation to go on. Is it possible, that someone could get out their old original OS 4.1 installation CD-ROM and fetch the elf.library.kmod from there so they can test my software? I know it's bothersome, but it would really help me quite a lot with some constructive user-insight.

Hope you enjoy!

Go to top
Re: DEbug 101
Home away from home
Home away from home


See User information
@alfkil

Changing only elf.library.kmod give you DSI on IPREFS on start, and you need to change IPREFS on the old one too. After that, system itself a bit unstable (i.e. for example pressing in Filer on db101.lha for unpacking, give you DSI), but unpacking from shell are works.

So, i run it, choice hello word. It loads, say few words about some sections, then i press start. Then again choice load hello word, again start. Then i press "x" button. Then load of hello word third time, and press "breakpoint" - and on that stage window are spawns, and everything lockups. Soft reboot are works, and by dumpdebugbuffer i see nothing.

After that i do reboot, trying to load hello word again, but at this moment i just press "breakpoint" after i select file. And it spawn me window, with fucked symbols, which make me think, that changing on old elf.library.kmod not help much. There is how it looks like:

Resized Image

And after it again lockup.

I have many ideas which can be interesting for you, but firstly need somehow to make works what we have already :)

Check PM plz


Edited by kas1e on 2010/9/24 19:14:14
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: DEbug 101
Just can't stay away
Just can't stay away


See User information
@kas1e

Ok great, that's the kind of information I need 8-D.

I think the explanation is this: There was a quickfix uploaded btw the plain v4.1 and Update 1, and I think I'm using the elf.library from that version. Currently this seems to be the only working version apart from the latest (unreleased) version.

I guess we just have to be patient and wait for a new quickfix...

Thanks kas1e for taking the trouble, I really appreciate it

Go to top
Re: DEbug 101
Home away from home
Home away from home


See User information
@alfkil

If i remember right, it was like this:
aos4.1
quick fix update
update1
update2

right ? I trying to use right now elf.library.kmod from the quick fix update for now : the same lockup on the breakpoint window. Maybe for you works that one from update1 ?

ps. Imho, for now you can redesign UI, just because for now its not too late :) because when you will add more and more feaures over "lockup the windowses" UI, it will be harder to rewrite it later.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: DEbug 101
Just can't stay away
Just can't stay away


See User information
@kas1e

Yeah, you are right, that's a good idea. I'll see what I can do, but as you know, this is my very first reaction app, and I'm a little weary about things still.

It is very strange, that the quickfix version gives you lockups. Here on my sam everything works just fine. Are you using a pegasos or amigaone? Are you using the latest upload from my dropbox?

Go to top
Re: DEbug 101
Just can't stay away
Just can't stay away


See User information
@kas1e

Hehe, it turned out, that there was a big fat ugly bug in my breakpoint window, and I'm pretty amazed that I could go on for so long without knowing.

You should try a new download and see, if things are better now. Remember, if you want to debug anything else than "helloworld" you should use gcc -gstabs.

Go to top
Re: DEbug 101
Home away from home
Home away from home


See User information
@alfkil
Tryed new version:

with elf.library.kmod from quickfix : run, select hello word, and pressing ok five DSI by memguard

with elf.library.kmod from update2(current one) : run, select hellow word, and pressing ok DSI with GR, GR stack trace:
Quote:

Symbol info:
Instruction pointer 0x7F98C1F0 belongs to module "db101" (PowerPC)
Symbol: gui + 0x1458 in section 1 offset 0x000041D0

Stack trace:
gui()+0x1458 (section 1 @ 0x41d0)
main()+0x24 (section 1 @ 0x167c)
native kernel module newlib.library.kmod+0x00001f44
native kernel module newlib.library.kmod+0x00002bd8
native kernel module newlib.library.kmod+0x00002d54
_start()+0x170 (section 1 @ 0x170)
native kernel module dos.library.kmod+0x0001b524
native kernel module kernel+0x0003ef08
native kernel module kernel+0x0003ef88


addr2line say:
Quote:

15/0.Work:debug/db101> addr2line -e db101 --section=.text 0x41d0
gui.c:492


And gui.c at line 492
Quote:

if (strlen(path) > 0)
strcpy (childpath, path);


If i comment out these strings, and recompile the debuger, and put elf.library.kmod from quickfix: then it runs, i can load the hello word, and set break button are works, and window not locks. Then i press: HexView button, browse it a bit. Close. Then i press Registers window, close, and have GR:
Stack Trace:

Quote:

Symbol info:
Instruction pointer 0x0181D4EC belongs to module "kernel" (HUNK/Kickstart)

Stack trace:
native kernel module kernel+0x0001d4ec
module work:debug/memguard/MemGuard at 0x7FB76BD4 (section 5 @ 0x8BB4)
native kernel module newlib.library.kmod+0x0000ffec
native kernel module newlib.library.kmod+0x000059f8
db101:hex_free_section_list()+0x40 (section 1 @ 0x496c)
db101:register_view()+0x8CC (section 1 @ 0x7018)
db101:gui()+0x1830 (section 1 @ 0x4578)
db101:main()+0x24 (section 1 @ 0x167c)
native kernel module newlib.library.kmod+0x00001f44
native kernel module newlib.library.kmod+0x00002b90
native kernel module newlib.library.kmod+0x00002d54
db101:_start()+0x170 (section 1 @ 0x170)
native kernel module dos.library.kmod+0x0001b524
native kernel module kernel+0x0003ef08
native kernel module kernel+0x0003ef88


Then again addr2line (on hex_free_section_list):

Quote:

16/0.Work:debug/db101/src> addr2line -e db101 --section=.text 0x496c
hexview.c:95


And hexview.c at line 95 are:
Quote:

for (i = 0; i < hex_numsections; i++)
free (sectionlist[i]);


commenting out of these strings did the trick (of course memory will not freed, but who cares for testing-purposes).

So, there is 2 bugs for now: arguments checking and free memory in hexviewer.


Edited by kas1e on 2010/9/25 10:29:45
Edited by kas1e on 2010/9/25 10:32:11
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: DEbug 101
Home away from home
Home away from home


See User information
@alfkil

Now when i do these 2 ugly "fix" to make debuger works fine, i test it more or less normally for now. And should to say: its indeed almost debugger already ! Of course there is still some missing information (like for example, when you press disassemble, you have just disassembled block, but, without references in which fucntion it. I mean (imho), when you press disasseble, will be cool if it will have in head that C source line, of which we have disassembled part.

Also i noticed, than in Hex Viewer, all the data a bit "unbound". It looks like this:

Resized Image

Will be good if it can have "good border canvas" (that will be easy for developers eyes to do brief views).

Also for now noticed that problem with "blocking windowses UI" : for example you set breakpoint, press start, then few steps, then, you press disasseble window, and then, you want to press "step" again, to see, how disasseble data are changes, but you cant. That a bid bad imho.

Also one more minus for "blocking windowses UI", its that for example, usually developers want to have register-info window all the time, and see in realtimve have it changes.

So (only imho of course), you need to redesign it to non-blocking windowses at this point, just to avoid problems in future :)

All in all its nice already, i think i already will use it for some stuff today (and then, can give more feadbacks).

Thanks for :)

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: DEbug 101
Home away from home
Home away from home


See User information
@alfkil
Found two more bugs: Trying to load "a.out" file (from src directory), it loads ok, then pressing on SetBreak, give GR, with stackpoint:
Quote:

Symbol info:
Instruction pointer 0x7F98DAF8 belongs to module "db101" (PowerPC)
Symbol: stabs_make_function_list + 0x118 in section 1 offset 0x00005AD8

Stack trace:
stabs_make_function_list()+0x118 (section 1 @ 0x5ad8)
select_symbol()+0x40 (section 1 @ 0x1bac)
gui()+0x17B8 (section 1 @ 0x4500)
main()+0x24 (section 1 @ 0x167c)
native kernel module newlib.library.kmod+0x00001f44
native kernel module newlib.library.kmod+0x00002bd8
native kernel module newlib.library.kmod+0x00002d54
_start()+0x170 (section 1 @ 0x170)
native kernel module dos.library.kmod+0x0001b524
native kernel module kernel+0x0003ef08
native kernel module kernel+0x0003ef88


The same if i for testing purposes trying to load "Filer" binary. The same loads fine, and pressing on BP button give the same GR.

addr2line on such stack trace point on "stabs.c:103", which are:
Quote:

uint32 stabsize = header->sh_size;

I think you not check there something on "if not present, then" ? (not exactly there, but early, at moment of loading).

Second one about loading of non-pcc binary. It sasy in the shell that "its not ppc binary", and then crashes (because i think it not exits correctly at this point?)


Edited by kas1e on 2010/9/25 17:15:14
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: DEbug 101
Just can't stay away
Just can't stay away


See User information
@kas1e

Quote:

Also i noticed, than in Hex Viewer, all the data a bit "unbound". It looks like this:


Judging from the screenshot that Hex Viewer really needs to use a non-proportial (fixed width) font. The "System default" font should be OK for this purpose as it's guaranteed to not be proportional.

Go to top
Re: DEbug 101
Just can't stay away
Just can't stay away


See User information
@salass00

EDIT: Problem solved, needed "courier.font" instead...

For now, I'm just using system default, which seems to be NOT non-proportional.

I've tried this:

Quote:

#include <proto/graphics.h>
#include <graphics/text.h>

struct TextAttr courier_font =
{
"courier",
11,
FS_NORMAL,
FPF_DISKFONT //i've also tried ROMFONT
};


int main()
{
struct TextFont *f;
if (!(f=IGraphics->OpenFont(&courier_font)))
printf("FAIL!\n");
else
IGraphics->CloseFont(f);

return 0;
}


but it doesn't work. Could someone provide a simple tangible example of how to successfully load the courier font??

Go to top
Re: DEbug 101
Just can't stay away
Just can't stay away


See User information
Fresh version of db101 uploaded. See original post.

Go to top
Re: DEbug 101
Just can't stay away
Just can't stay away


See User information
@alfkil

Quote:

For now, I'm just using system default, which seems to be NOT non-proportional.


No, you're not. System default font can be found in GfxBase:
((struct GfxBase *)GfxBase)->DefaultFont;


DateTime.docky defaults to this font and it is non-proportional.

Go to top

  Register To Post
« 1 2 (3) 4 5 6 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project