It is currently Sat Jan 23, 2021 2:41 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Source Level Disassembler for PureBasic?
PostPosted: Wed Oct 21, 2015 9:54 pm 
Offline
Enthusiast
Enthusiast

Joined: Sun Feb 22, 2015 2:33 am
Posts: 139
Is there a source level disassembler that works with PureBasic?

I would like to examine the actual x86 or x64 generated code that corresponds to the original PB source.

_________________
Think Unicode!


Top
 Profile  
Reply with quote  
 Post subject: Re: Source Level Disassembler for PureBasic?
PostPosted: Wed Oct 21, 2015 10:06 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Aug 15, 2009 6:59 pm
Posts: 1260
ElementE wrote:
Is there a source level disassembler that works with PureBasic?

I would like to examine the actual x86 or x64 generated code that corresponds to the original PB source.

Actualy PB generates asm code. You can keep the commented (comments are the PB source lines) asm file by launching the PB compiler with the parameter /COMMENTED.


Top
 Profile  
Reply with quote  
 Post subject: Re: Source Level Disassembler for PureBasic?
PostPosted: Wed Oct 21, 2015 10:48 pm 
Offline
Enthusiast
Enthusiast

Joined: Sun Feb 22, 2015 2:33 am
Posts: 139
Quote:
Actualy PB generates asm code. You can keep the commented (comments are the PB source lines) asm file by launching the PB compiler with the parameter /COMMENTED.

Thanks Thorium.

PureBasic seems to have already built into it everything that a programmer needs.

_________________
Think Unicode!


Top
 Profile  
Reply with quote  
 Post subject: jas
PostPosted: Thu Nov 26, 2015 6:04 pm 
Offline
New User
New User

Joined: Sun Jan 26, 2014 7:32 pm
Posts: 5
For assembly programming a better debugger or a way to send debug info to another debugger would be nice.


Top
 Profile  
Reply with quote  
 Post subject: Re: jas
PostPosted: Fri Nov 27, 2015 1:03 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Aug 15, 2009 6:59 pm
Posts: 1260
jas wrote:
For assembly programming a better debugger or a way to send debug info to another debugger would be nice.

I use OllyDbg or x64dbg to debug assembly code.
Just put a "!int 3" befor your code, to trigger a breakpoint in the debugger. Then i single step through the code.


Top
 Profile  
Reply with quote  
 Post subject: Re: Source Level Disassembler for PureBasic?
PostPosted: Fri Nov 27, 2015 5:22 pm 
Offline
User
User

Joined: Sat May 10, 2008 7:52 am
Posts: 38
Location: SecondLife
You can use Bochs (x86 emulator), i love it !


Quote:
When you're using Bochs with the internal debugger, you can trigger the debugger via a facility called magic breakpoints. To trigger a breakpoint, you can insert xchg bx, bx (in GAS syntax, xchgw %bx, %bx) anywhere in the code and Bochs will trap into the debugger as soon as it executes it. On real hardware this has no effect as it merely replaces the BX register with itself.
You should put the following line in your Bochs configuration file to have it listen to magic breakpoints: magic_break: enabled=1


You'll also debug the OS :)


Top
 Profile  
Reply with quote  
 Post subject: jas
PostPosted: Sun Dec 13, 2015 2:32 am 
Offline
New User
New User

Joined: Sun Jan 26, 2014 7:32 pm
Posts: 5
Thorium wrote:
jas wrote:
For assembly programming a better debugger or a way to send debug info to another debugger would be nice.

I use OllyDbg or x64dbg to debug assembly code.
Just put a "!int 3" befor your code, to trigger a breakpoint in the debugger. Then i single step through the code.



Exactly my point. Having to halt a program then use another debugger is required to see the actual disassembly and the full register set. It reminds me of how I had to program personal computers back in the 1980s before source-level assembly debuggers.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye