Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

<Overfiend> Joy: Hey, I'm an asshole. Assholes emit odious gas. That's what we do.


programming / alt.lang.asm / Re: NASM debugging

SubjectAuthor
* NASM debuggingdesmond ng
+- Re: NASM debuggingPeter Cheung
+* Re: NASM debuggingFrank Kotler
|+* Re: NASM debuggingRobert Wessel
||`- Re: NASM debuggingFrank Kotler
|`- Re: NASM debuggingShadow
+- Re: NASM debuggingRobert Wessel
+* Re: NASM debuggingRod Pemberton
|`- Re: NASM debuggingPeter Cheung
`- Re: NASM debuggingRick C. Hodgin

1
Subject: NASM debugging
From: desmond ng
Newsgroups: alt.lang.asm
Date: Wed, 5 Jun 2019 17:32 UTC
X-Received: by 2002:a37:5d44:: with SMTP id r65mr15560014qkb.221.1559755949877;
Wed, 05 Jun 2019 10:32:29 -0700 (PDT)
X-Received: by 2002:a0d:fdc7:: with SMTP id n190mr19171565ywf.282.1559755949513;
Wed, 05 Jun 2019 10:32:29 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!j96no322600qte.0!news-out.google.com!45ni228qtw.0!nntp.google.com!j96no322591qte.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Wed, 5 Jun 2019 10:32:29 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=124.217.189.73;
posting-account=AD38jAkAAAAXuFJgTfy3b8KKzEem_zEG
NNTP-Posting-Host: 124.217.189.73
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <083bc224-2dfb-479e-8eeb-1685b5f06302@googlegroups.com>
Subject: NASM debugging
From: desmondc...@gmail.com (desmond ng)
Injection-Date: Wed, 05 Jun 2019 17:32:29 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 0
View all headers
I want to debug the NASM compiler, and I have the NASM's source code, but what should I do so that I can debug how NASM works in Visual Studio 2010 when I enter some assembly language to NASM. I know I need Perl script, then what's next?


Subject: Re: NASM debugging
From: Peter Cheung
Newsgroups: alt.lang.asm
Date: Thu, 6 Jun 2019 21:41 UTC
References: 1
X-Received: by 2002:a37:e10e:: with SMTP id c14mr22398489qkm.54.1559857266879;
Thu, 06 Jun 2019 14:41:06 -0700 (PDT)
X-Received: by 2002:a81:6e82:: with SMTP id j124mr25167218ywc.27.1559857266552;
Thu, 06 Jun 2019 14:41:06 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!j96no1071142qte.0!news-out.google.com!d20ni42qtd.0!nntp.google.com!j96no1071140qte.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Thu, 6 Jun 2019 14:41:06 -0700 (PDT)
In-Reply-To: <083bc224-2dfb-479e-8eeb-1685b5f06302@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=123.202.209.162;
posting-account=bv9fUwoAAAALZPMyH_uNDx4MtNzAsvy6
NNTP-Posting-Host: 123.202.209.162
References: <083bc224-2dfb-479e-8eeb-1685b5f06302@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c26a22ca-21d5-414c-96a6-287c843deff1@googlegroups.com>
Subject: Re: NASM debugging
From: mcheun...@gmail.com (Peter Cheung)
Injection-Date: Thu, 06 Jun 2019 21:41:06 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 8
View all headers
desmond ng於 2019年6月6日星期四 UTC+8上午1時32分31秒寫道:
I want to debug the NASM compiler, and I have the NASM's source code, but what should I do so that I can debug how NASM works in Visual Studio 2010 when I enter some assembly language to NASM. I know I need Perl script, then what's next?

focus on intel manual, you are unable to learn from nasm so quickly


Subject: Re: NASM debugging
From: Frank Kotler
Newsgroups: alt.lang.asm
Organization: Aioe.org NNTP Server
Date: Thu, 6 Jun 2019 22:05 UTC
References: 1
Path: i2pn2.org!i2pn.org!aioe.org!.POSTED.HFxNovPN5bIzhS5XghwGYQ.user.gioia.aioe.org!not-for-mail
From: fbkot...@myfairpoint.net (Frank Kotler)
Newsgroups: alt.lang.asm
Subject: Re: NASM debugging
Date: Thu, 6 Jun 2019 18:05:52 -0400
Organization: Aioe.org NNTP Server
Lines: 10
Message-ID: <qdc35f$1e12$1@gioia.aioe.org>
References: <083bc224-2dfb-479e-8eeb-1685b5f06302@googlegroups.com>
NNTP-Posting-Host: HFxNovPN5bIzhS5XghwGYQ.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.5.2
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
View all headers
On 06/05/2019 01:32 PM, desmond ng wrote:
I want to debug the NASM compiler, and I have the NASM's source code, but what should I do so that I can debug how NASM works in Visual Studio 2010 when I enter some assembly language to NASM. I know I need Perl script, then what's next?


Whatever debugger you'd use for any other executable? I think Windoze calls theirs "Codeview"... or perhaps Olleydbg? ... I would think...

Best,
Frank



Subject: Re: NASM debugging
From: Robert Wessel
Newsgroups: alt.lang.asm
Organization: Forte - www.forteinc.com
Date: Fri, 7 Jun 2019 00:47 UTC
References: 1 2
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx06.iad.POSTED!not-for-mail
From: robertwe...@yahoo.com (Robert Wessel)
Newsgroups: alt.lang.asm
Subject: Re: NASM debugging
Message-ID: <0gcjfel8b15eti1ki88hvi1rbm657uhaco@4ax.com>
References: <083bc224-2dfb-479e-8eeb-1685b5f06302@googlegroups.com> <qdc35f$1e12$1@gioia.aioe.org>
User-Agent: ForteAgent/7.20.32.1218
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 13
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Thu, 06 Jun 2019 19:47:25 -0500
X-Received-Bytes: 1529
X-Received-Body-CRC: 2745864474
View all headers
On Thu, 6 Jun 2019 18:05:52 -0400, Frank Kotler
<fbkotler@myfairpoint.net> wrote:

On 06/05/2019 01:32 PM, desmond ng wrote:
I want to debug the NASM compiler, and I have the NASM's source code, but what should I do so that I can debug how NASM works in Visual Studio 2010 when I enter some assembly language to NASM. I know I need Perl script, then what's next?


Whatever debugger you'd use for any other executable? I think Windoze
calls theirs "Codeview"... or perhaps Olleydbg? ... I would think...


While the Visual Studio Debugger traces it roots back to CodeView,
there hasn't been anything named that since the early/mid 1990s.


Subject: Re: NASM debugging
From: Frank Kotler
Newsgroups: alt.lang.asm
Organization: Aioe.org NNTP Server
Date: Fri, 7 Jun 2019 01:38 UTC
References: 1 2 3
Path: i2pn2.org!i2pn.org!aioe.org!.POSTED.HFxNovPN5bIzhS5XghwGYQ.user.gioia.aioe.org!not-for-mail
From: fbkot...@myfairpoint.net (Frank Kotler)
Newsgroups: alt.lang.asm
Subject: Re: NASM debugging
Date: Thu, 6 Jun 2019 21:38:51 -0400
Organization: Aioe.org NNTP Server
Lines: 21
Message-ID: <qdcfko$14v4$1@gioia.aioe.org>
References: <083bc224-2dfb-479e-8eeb-1685b5f06302@googlegroups.com>
<qdc35f$1e12$1@gioia.aioe.org> <0gcjfel8b15eti1ki88hvi1rbm657uhaco@4ax.com>
NNTP-Posting-Host: HFxNovPN5bIzhS5XghwGYQ.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.5.2
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
View all headers
On 06/06/2019 08:47 PM, Robert Wessel wrote:
On Thu, 6 Jun 2019 18:05:52 -0400, Frank Kotler
<fbkotler@myfairpoint.net> wrote:

On 06/05/2019 01:32 PM, desmond ng wrote:
I want to debug the NASM compiler, and I have the NASM's source code, but what should I do so that I can debug how NASM works in Visual Studio 2010 when I enter some assembly language to NASM. I know I need Perl script, then what's next?


Whatever debugger you'd use for any other executable? I think Windoze
calls theirs "Codeview"... or perhaps Olleydbg? ... I would think...


While the Visual Studio Debugger traces it roots back to CodeView,
there hasn't been anything named that since the early/mid 1990s.


Okay, I'm out of date om Windows. Sorry.

Best,
Frank



Subject: Re: NASM debugging
From: Robert Wessel
Newsgroups: alt.lang.asm
Organization: Forte - www.forteinc.com
Date: Fri, 7 Jun 2019 03:07 UTC
References: 1
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!border2.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!85.12.16.69.MISMATCH!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx36.iad.POSTED!not-for-mail
From: robertwe...@yahoo.com (Robert Wessel)
Newsgroups: alt.lang.asm
Subject: Re: NASM debugging
Message-ID: <j5djfe1mt6voueev78ime9o6ga7m3bp669@4ax.com>
References: <083bc224-2dfb-479e-8eeb-1685b5f06302@googlegroups.com>
User-Agent: ForteAgent/7.20.32.1218
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 18
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Thu, 06 Jun 2019 22:07:57 -0500
X-Received-Bytes: 1617
X-Received-Body-CRC: 3951340042
X-Original-Bytes: 1323
View all headers
On Wed, 5 Jun 2019 10:32:29 -0700 (PDT), desmond ng
<desmondctng@gmail.com> wrote:

I want to debug the NASM compiler, and I have the NASM's source code, but what should I do so that I can debug how NASM works in Visual Studio 2010 when I enter some assembly language to NASM. I know I need Perl script, then what's next?


I took a (very) quick look at NASM sources.  It appears that they're
set up to build from the command line, the instructions appears to be
clear enough.

Once you've got that to build with debug info (there's an option in
the supplied makefile for including debug info), start it from the
MSVC command line with something like:

  devenv /DebugExe myprogram.exe

You may have to press F10 at that point to step to the first line of
code.


Subject: Re: NASM debugging
From: Rod Pemberton
Newsgroups: alt.lang.asm
Organization: Aioe.org NNTP Server
Date: Fri, 7 Jun 2019 06:49 UTC
References: 1
Path: i2pn2.org!i2pn.org!aioe.org!.POSTED.+15yR2JuBIwiofOqK4kSZw.user.gioia.aioe.org!not-for-mail
From: inva...@lkntrgzxc.com (Rod Pemberton)
Newsgroups: alt.lang.asm
Subject: Re: NASM debugging
Date: Fri, 7 Jun 2019 02:49:58 -0400
Organization: Aioe.org NNTP Server
Lines: 35
Message-ID: <qdd19j$1emv$1@gioia.aioe.org>
References: <083bc224-2dfb-479e-8eeb-1685b5f06302@googlegroups.com>
NNTP-Posting-Host: +15yR2JuBIwiofOqK4kSZw.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
X-Notice: Filtered by postfilter v. 0.9.2
View all headers
On Wed, 5 Jun 2019 10:32:29 -0700 (PDT)
desmond ng <desmondctng@gmail.com> wrote:

I want to debug the NASM compiler, and I have the NASM's source code,
but what should I do so that I can debug how NASM works in Visual
Studio 2010 when I enter some assembly language to NASM. I know I
need Perl script, then what's next?

I'm not familiar with Visual Studio.

The most reliable method I've use to trace programs is simple, quick,
but brute-force.  I've used this method numerous times over the
decades.  It works well.  You don't need a debugger or IDE etc.

Emit a character e.g., putchar() in C, at the top of each procedure
with a different character for each procedure.  Compile and execute the
program.  Watch what characters the program emits as it runs.  The
sequence of emitted characters shows you the control-flow sequence of
the program for the given input and program options.

If the result isn't fine-grained enough, delete those puthchar's and
add more into the procedures you're interested in watching, or place the
putchar's deeper into specific procedures, e.g., at the beginning of
loops or prior to procedure calls (without putchar's), etc.

You could also wrap the putchar's in #ifdef's to not need to delete
them later, i.e., let the C pre-processor select/deselect the code
based upon #define's at the top of the file.


Rod Pemberton
--
Once upon a time, many decades ago in a place far away, humble people
sought their freedom, and lost. "Ideas are bulletproof."



Subject: Re: NASM debugging
From: Peter Cheung
Newsgroups: alt.lang.asm
Date: Fri, 7 Jun 2019 08:19 UTC
References: 1 2
X-Received: by 2002:a37:d244:: with SMTP id f65mr19404646qkj.227.1559895542711;
Fri, 07 Jun 2019 01:19:02 -0700 (PDT)
X-Received: by 2002:a81:92c1:: with SMTP id j184mr876644ywg.141.1559895542195;
Fri, 07 Jun 2019 01:19:02 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!j96no1339471qte.0!news-out.google.com!d20ni67qtd.0!nntp.google.com!j96no1339462qte.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Fri, 7 Jun 2019 01:19:01 -0700 (PDT)
In-Reply-To: <qdd19j$1emv$1@gioia.aioe.org>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=14.0.157.209; posting-account=bv9fUwoAAAALZPMyH_uNDx4MtNzAsvy6
NNTP-Posting-Host: 14.0.157.209
References: <083bc224-2dfb-479e-8eeb-1685b5f06302@googlegroups.com> <qdd19j$1emv$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1224a857-9385-4860-adfb-91c881308283@googlegroups.com>
Subject: Re: NASM debugging
From: mcheun...@gmail.com (Peter Cheung)
Injection-Date: Fri, 07 Jun 2019 08:19:02 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
I think desmond need to learn how to use "GDB" to debug nasm in linux. For windows, i don't know.


Subject: Re: NASM debugging
From: Shadow
Newsgroups: alt.lang.asm
Organization: A noiseless patient Shadow
Date: Mon, 10 Jun 2019 14:51 UTC
References: 1 2
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!spln!extra.newsguy.com!newsp.newsguy.com!news1
From: Sh...@dow.br (Shadow)
Newsgroups: alt.lang.asm
Subject: Re: NASM debugging
Date: Mon, 10 Jun 2019 11:51:37 -0300
Organization: A noiseless patient Shadow
Lines: 25
Message-ID: <pcrsfe9tiqqfcdfetlgccrfd5nlmvgoik7@4ax.com>
References: <083bc224-2dfb-479e-8eeb-1685b5f06302@googlegroups.com> <qdc35f$1e12$1@gioia.aioe.org>
NNTP-Posting-Host: pedfac36b8cf74e86ffe3f75cf8624352c9240cad25a12523.newsdawg.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Newsreader: Forte Agent 3.3/32.846
X-Received-Bytes: 1682
X-Received-Body-CRC: 148881998
View all headers
On Thu, 6 Jun 2019 18:05:52 -0400, Frank Kotler
<fbkotler@myfairpoint.net> wrote:

On 06/05/2019 01:32 PM, desmond ng wrote:
I want to debug the NASM compiler, and I have the NASM's source code, but what should I do so that I can debug how NASM works in Visual Studio 2010 when I enter some assembly language to NASM. I know I need Perl script, then what's next?


Whatever debugger you'd use for any other executable? I think Windoze
calls theirs "Codeview"... or perhaps Olleydbg? ... I would think...


I still use Ollydbg, because I'm too stubborn to change. And
it works for most stuff.

But the latest and probably bestist is:

https://sourceforge.net/projects/x64dbg/

It's portable, and contains both 32 and 64 bit versions. It'll
debug just about anything M$.
Same basic hotkeys as OllyDbg.
[]'s
--
Don't be evil - Google 2004
We have a new policy  - Google 2012


Subject: Re: NASM debugging
From: Rick C. Hodgin
Newsgroups: alt.lang.asm
Date: Mon, 10 Jun 2019 16:11 UTC
References: 1
X-Received: by 2002:a0c:981b:: with SMTP id c27mr57955510qvd.48.1560183094944;
Mon, 10 Jun 2019 09:11:34 -0700 (PDT)
X-Received: by 2002:a81:4851:: with SMTP id v78mr23822272ywa.286.1560183094729;
Mon, 10 Jun 2019 09:11:34 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!j96no77743qte.0!news-out.google.com!33ni15qtt.0!nntp.google.com!j96no77737qte.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: alt.lang.asm
Date: Mon, 10 Jun 2019 09:11:34 -0700 (PDT)
In-Reply-To: <083bc224-2dfb-479e-8eeb-1685b5f06302@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=12.18.147.98; posting-account=BcpLkAoAAACbVwkzAAKP0XXOd-MDREpp
NNTP-Posting-Host: 12.18.147.98
References: <083bc224-2dfb-479e-8eeb-1685b5f06302@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ef588f49-2845-475f-9f86-eb53ded53d97@googlegroups.com>
Subject: Re: NASM debugging
From: rick.c.h...@gmail.com (Rick C. Hodgin)
Injection-Date: Mon, 10 Jun 2019 16:11:34 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 16
View all headers
On Wednesday, June 5, 2019 at 1:32:31 PM UTC-4, desmond ng wrote:
I want to debug the NASM compiler, and I have the NASM's source code, but what should I do so that I can debug how NASM works in Visual Studio 2010 when I enter some assembly language to NASM. I know I need Perl script, then what's next?

I'm not sure how NASM is built, but if you can get it to build in
MSVC/MSVC++ you'll be able to single-step through, set breakpoints,
etc., like normal.

If you can't get it sorted out, I can try to get NASM to compile in
VS and see what's involved.

Note also that if you can get it to compile with MinGW or other gcc/
gdb-based toolset, you can still debug it in Visual Studio 2015 or
later.  It has less robust capabilities, but it will debug natively
in the normal Visual Studio IDE.

--
Rick C. Hodgin


1
rocksolid light 0.7.2
clearneti2ptor