English Amiga Board


Go Back   English Amiga Board > Requests > request.UAE Wishlist

 
 
Thread Tools
Old 25 November 2009, 15:52   #1
AmigaBoy
Registered User
 
Join Date: Aug 2004
Location: 19 Jump Street
Posts: 238
Load executable as a process

Would it be possible to have the WinUAE debugger be able to load in an Amiga executable as a process?
For example, if I wanted to load a program, set a breakpoint, and then run the program, I would do something similar to:

Code:
lm "C:\amigaexe"
C:\amigaexe loaded to 123456

f 123500
Breakpoint added

g 123456
At the moment, the closest I have is to load the program as a process from within a debugger in Workbench, then either continue from there or switch to WinUAE's debugger on the halted program.

Is this easily done, or is it something that we can never expect to see? I get the feeling that this won't be something trivial to implement, but I'm bringing it up just in case.
AmigaBoy is offline  
Old 26 November 2009, 13:37   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
What do you exactly want? and why?

Loading standard Amiga executable to absolute address and start new process? Don't really see (or like) the point of absolute address(es).

Anyway, it won't be easy, need some extra m68k code (best place is "uae boot rom") that does loading, relocation, break point setup to first code hunk and finally process starting.

I don't think this is worth the trouble without some really good answers to "why"
Toni Wilen is online now  
Old 26 November 2009, 13:52   #3
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Hmm, the way I understand it (and I may be wrong) is that he wants to break into a program as soon as it is loaded? I.e. program loads but instead of executing it he wants to enter the debugger.

Edit: i.e. there could be a debugger command "ld" (load/debug), after it is entered, debugger exits and breaks once AmigaDOS loads the next file. Don't know if that's what Jason wants or if it is easy to implement though.

Last edited by StingRay; 26 November 2009 at 14:04. Reason: Some more info added
StingRay is offline  
Old 26 November 2009, 14:27   #4
AmigaBoy
Registered User
 
Join Date: Aug 2004
Location: 19 Jump Street
Posts: 238
You've both got it

I basically wanted WinUAE's debugger to replace BDebug (which comes with BarFly), or any other debugger's. I want to be able to load in a program (not necessarily at an absolute address), set any breakpoints that I need to, or even modify the program's code in memory at that point, and then run it. At the moment WinUAE's debugger works much like Action Replay, which is fine for most things, but when it comes to things from within Workbench, it becomes difficult. This is because when I double click on something in Workbench, it loads immediately. I don't have the ability to set any breakpoints at the beginning of a certain routine because it's likely to have already been executed.

I was thinking about it today and I came up with an easier solution that won't require changes to WinUAE's core (I think).
How about a program in the "Amiga Programs" directory that loads the executable as a process, then when it's ready, it brings up the WinUAE debugger automatically? From there I can set any breakpoints, or manipulate memory, then as soon as I type 'g' to continue emulation, things proceed as normal. For example:

loaddebug <filename> [filename_parameters] [address]
loaddebug dh0:games/dg/deluxegalaga

The game would be loaded but before it can execute anything, WinUAE's debugger pops up with a message like:

dh0:games/dg/deluxegalaga loaded to 0x123456

From here I can do any manipulations or set any breakpoints, then I type 'g' and everything proceeds as if I double clicked on the icon, or executed from the shell.

Thoughts? Am I the only one that might find this sort of thing useful?
AmigaBoy is offline  
Old 26 November 2009, 18:43   #5
WayneK
Registered User
 
Join Date: May 2004
Location: Somewhere secret
Age: 50
Posts: 366
No you're not the only one, that would be very useful for some situations... personally I like Sting's "ld" command idea. The Atari ST emulator "STEEM" has a "break on next program execution" feature which I found myself using several times, a UAE equivalent would be great.
WayneK is offline  
Old 26 November 2009, 19:57   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,519
Comparing non-multitasking OS to multitasking one: useless.

Quote:
loaddebug <filename> [filename_parameters] [address]
Should be easy to implement. (but do not expect anything until 2.0 is done)
Toni Wilen is online now  
Old 26 November 2009, 20:03   #7
clenched
Registered User
 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 771
This command is available might help:

fp "<name>"/<addr> Step forward until process <name> or <addr> is active

Goto WinUAE debugger and issue that command.
In this case just use program name in quotes.
Position the debug window so it will remain visible.
Do not type x afterward because WinUAE immediately becomes active again.
Click/type program from Workbench and program is halted.
This command doesn't appear "sticky" like breakpoints so it needs to be re-issued each time needed.
clenched is offline  
Old 27 November 2009, 03:42   #8
AmigaBoy
Registered User
 
Join Date: Aug 2004
Location: 19 Jump Street
Posts: 238
WayneK: StingRay's "ld" is the same as what I had mentioned in my first post, "lm". I chose "lm" because that's ARIII's command for the same thing. It's a great idea if it's easily done, however there's too much happening in the OS at any one time for it to be that simple. That's why I changed my suggestion to an Amiga program that does the minimum required, and let the OS take care of the rest. There's no need to reinvent the wheel. But yes, I think in an ideal world, this "ld"/"lm" command would be the way to go.

Toni: Thanks for looking at it. If it's too difficult, there's no need to do it. It's just something that I think could make life easier for debugging. It's not an absolute necessity, especially since I can continue to use BDebug if need be.

clenched: You're today's hero I had no idea that command was able to pause execution when a process becomes active. I gave it a try and for my current purposes, it does exactly what I need it to do. Thanks for pointing it out, and thanks to Toni (or whomever implemented it) for coding it.

For now I'll be using the "fp" command for everything, so I'm happy. Perhaps in future the "loaddebug" program, or "ld" command can be implemented but to anyone else that needs the functionality right now, "fp" does the job.
AmigaBoy is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Breakpoint on process start Wicked_Digger support.WinUAE 1 30 March 2011 20:03
Just started the 'whitening' process... tonyyeb support.Hardware 38 22 August 2008 23:09
Which gamemap should i process next...?? Joe Maroni HOL contributions 35 10 July 2008 05:36
need for help in backup/archive process pbareges support.Other 8 29 March 2007 15:02
Pixel64 requires cybergfx v4.2 upgrading process? Smiley support.Hardware 6 11 July 2006 15:19

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:56.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07579 seconds with 15 queries