Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The memory management on the PowerPC can be used to frighten small children. -- Linus Torvalds


devel / comp.lang.forth / ARM Dis-assembler for GForth

SubjectAuthor
* ARM Dis-assembler for GForthBrian Fox
`* Re: ARM Dis-assembler for GForthAnton Ertl
 +* Re: ARM Dis-assembler for GForthnone
 |`- Re: ARM Dis-assembler for GForthAnton Ertl
 `- Re: ARM Dis-assembler for GForthBrian Fox

1
ARM Dis-assembler for GForth

<8fa6e6ff-e9da-4d4b-be34-f454887d8ce7n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22218&group=comp.lang.forth#22218

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:5a0b:b0:53c:7e2a:ab0 with SMTP id lu11-20020a0562145a0b00b0053c7e2a0ab0mr504004qvb.69.1675391389017;
Thu, 02 Feb 2023 18:29:49 -0800 (PST)
X-Received: by 2002:a81:d543:0:b0:4fe:db73:d9c6 with SMTP id
l3-20020a81d543000000b004fedb73d9c6mr708981ywj.308.1675391388803; Thu, 02 Feb
2023 18:29:48 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 2 Feb 2023 18:29:48 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:8923:600:7c92:de1d:a206:c315;
posting-account=2z7GawoAAADc70p5SM5AbaCyzjLblS3g
NNTP-Posting-Host: 2607:fea8:8923:600:7c92:de1d:a206:c315
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8fa6e6ff-e9da-4d4b-be34-f454887d8ce7n@googlegroups.com>
Subject: ARM Dis-assembler for GForth
From: brian....@brianfox.ca (Brian Fox)
Injection-Date: Fri, 03 Feb 2023 02:29:49 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1295
 by: Brian Fox - Fri, 3 Feb 2023 02:29 UTC

A question came up on Reddit /Forth by a person with an Apple M1.
They tried to use SEE but code words would not dis-assemble.
Is there anyone thinking about making one in Forth?
Could gFoRTH be made to interface to gbd in a workable way?

Asking for a friend.

Re: ARM Dis-assembler for GForth

<2023Feb3.080017@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22219&group=comp.lang.forth#22219

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: ARM Dis-assembler for GForth
Date: Fri, 03 Feb 2023 07:00:17 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 77
Message-ID: <2023Feb3.080017@mips.complang.tuwien.ac.at>
References: <8fa6e6ff-e9da-4d4b-be34-f454887d8ce7n@googlegroups.com>
Injection-Info: reader01.eternal-september.org; posting-host="4f6f460af62ee7969d064311fafd2f31";
logging-data="1396331"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18B0kniIodbgzARlWdZLwpw"
Cancel-Lock: sha1:IUkLn6mrMksd131Vvqd30EVapds=
X-newsreader: xrn 10.11
 by: Anton Ertl - Fri, 3 Feb 2023 07:00 UTC

Brian Fox <brian.fox@brianfox.ca> writes:
>A question came up on Reddit /Forth by a person with an Apple M1.
>They tried to use SEE but code words would not dis-assemble.
>Is there anyone thinking about making one in Forth?
>Could gFoRTH be made to interface to gbd in a workable way?

Gforth has had a gdb-based disassembler since 0.7. Some OSs
(e.g. Ubuntu) by default maim the ptrace system call and disasm-gdb
does not work there. On Ubuntu you can fix this with

sudo echo 0 >/proc/sys/kernel/yama/ptrace_scope

or (after the next reboot) by changing /etc/sysctl.d/10-ptrace.conf

The development version of Gforth also has Forth disassemblers for the
ARM A64 (aka Aarch64) and some 32-bit ARM instruction set:

Here's on a A64 Ubuntu system with the fix above, using gforth-fast in
either case:

Gforth 0.7.3, Copyright (C) 1995-2008 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
see +
Code +
0x0000aaaae8bfa884 <gforth_engine+3220>: ldr x0, [x23, #8]!
0x0000aaaae8bfa888 <gforth_engine+3224>: add x25, x25, #0x8
0x0000aaaae8bfa88c <gforth_engine+3228>: add x24, x24, x0
0x0000aaaae8bfa890 <gforth_engine+3232>: ldur x2, [x25, #-8]
0x0000aaaae8bfa894 <gforth_engine+3236>: br x2
0x0000aaaae8bfa898 <gforth_engine+3240>: ldur x2, [x25, #-8]
0x0000aaaae8bfa89c <gforth_engine+3244>: br x2
0x0000aaaae8bfa8a0 <gforth_engine+3248>: br x2
0x0000aaaae8bfa8a4 <gforth_engine+3252>: mov x4, x25
0x0000aaaae8bfa8a8 <gforth_engine+3256>: ldr x0, [x4], #8
0x0000aaaae8bfa8ac <gforth_engine+3260>: add x24, x0, x24
0x0000aaaae8bfa8b0 <gforth_engine+3264>: add x25, x4, #0x8
0x0000aaaae8bfa8b4 <gforth_engine+3268>: ldur x2, [x25, #-8]
0x0000aaaae8bfa8b8 <gforth_engine+3272>: br x2
Warning: 'set logging off', an alias for the command 'set logging enabled', is deprecated.
Use 'set logging enabled off'.

end-code

Gforth 0.7.9_20230114
....
see +
Code +
AAAAADB6DF70: ldr x0, [x25,#0x8]!
AAAAADB6DF74: add x26, x26, #0x8
AAAAADB6DF78: add x27, x0, x27
AAAAADB6DF7C: ldur x1, [x26,#-0x8]
AAAAADB6DF80: br x1
end-code
ok
' disasm-gdb is discode ok
see +
Code +
0x0000aaaaadb6df70 <gforth_engine+2640>: ldr x0, [x25, #8]!
0x0000aaaaadb6df74 <gforth_engine+2644>: add x26, x26, #0x8
0x0000aaaaadb6df78 <gforth_engine+2648>: add x27, x0, x27
0x0000aaaaadb6df7c <gforth_engine+2652>: ldur x1, [x26, #-8]
0x0000aaaaadb6df80 <gforth_engine+2656>: br x1
Warning: 'set logging off', an alias for the command 'set logging enabled', is deprecated.
Use 'set logging enabled off'.

end-code

Development Gforth did not work on MacOS on Apple Silicon last time I
tried it.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2022: https://euro.theforth.net

Re: ARM Dis-assembler for GForth

<nnd$458f1d63$46efd09d@44033a68eed4ed21>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22223&group=comp.lang.forth#22223

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: Re: ARM Dis-assembler for GForth
References: <8fa6e6ff-e9da-4d4b-be34-f454887d8ce7n@googlegroups.com> <2023Feb3.080017@mips.complang.tuwien.ac.at>
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$458f1d63$46efd09d@44033a68eed4ed21>
Organization: KPN B.V.
Date: Fri, 03 Feb 2023 12:28:03 +0100
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!npeer.as286.net!npeer-ng0.as286.net!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe005.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 19
Injection-Date: Fri, 03 Feb 2023 12:28:03 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1382
 by: none - Fri, 3 Feb 2023 11:28 UTC

In article <2023Feb3.080017@mips.complang.tuwien.ac.at>,
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
<SNIP>
>Development Gforth did not work on MacOS on Apple Silicon last time I
>tried it.

I heard that the newest apple have a change of type of processor.
Does gforth run on those already?

>
>- anton

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -

Re: ARM Dis-assembler for GForth

<2023Feb3.133358@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22224&group=comp.lang.forth#22224

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: ARM Dis-assembler for GForth
Date: Fri, 03 Feb 2023 12:33:58 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 22
Message-ID: <2023Feb3.133358@mips.complang.tuwien.ac.at>
References: <8fa6e6ff-e9da-4d4b-be34-f454887d8ce7n@googlegroups.com> <2023Feb3.080017@mips.complang.tuwien.ac.at> <nnd$458f1d63$46efd09d@44033a68eed4ed21>
Injection-Info: reader01.eternal-september.org; posting-host="4f6f460af62ee7969d064311fafd2f31";
logging-data="1522763"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+AJxD8a9OFxzzfDJCQ7757"
Cancel-Lock: sha1:1/UzwQ8Jzegye19Fg/kFBZQKR54=
X-newsreader: xrn 10.11
 by: Anton Ertl - Fri, 3 Feb 2023 12:33 UTC

albert@cherry.(none) (albert) writes:
>In article <2023Feb3.080017@mips.complang.tuwien.ac.at>,
>Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
><SNIP>
>>Development Gforth did not work on MacOS on Apple Silicon last time I
>>tried it.
>
>I heard that the newest apple have a change of type of processor.

It is unclear what you mean.

>Does gforth run on those already?

Gforth runs on the Apple M1 on Linux without problems. I expect that
it runs on the Apple M2 on Linux, too.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2022: https://euro.theforth.net

Re: ARM Dis-assembler for GForth

<1fe4bf28-32d5-4d43-b0fd-f53c3281bec5n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=22231&group=comp.lang.forth#22231

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:4c09:0:b0:537:7ad6:1f2f with SMTP id bz9-20020ad44c09000000b005377ad61f2fmr678167qvb.27.1675457588486;
Fri, 03 Feb 2023 12:53:08 -0800 (PST)
X-Received: by 2002:a25:ad11:0:b0:80b:7021:b88d with SMTP id
y17-20020a25ad11000000b0080b7021b88dmr1585980ybi.93.1675457587995; Fri, 03
Feb 2023 12:53:07 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Fri, 3 Feb 2023 12:53:07 -0800 (PST)
In-Reply-To: <2023Feb3.080017@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:fea8:2a60:9ae:6221:d052:a3fd:187a;
posting-account=2z7GawoAAADc70p5SM5AbaCyzjLblS3g
NNTP-Posting-Host: 2607:fea8:2a60:9ae:6221:d052:a3fd:187a
References: <8fa6e6ff-e9da-4d4b-be34-f454887d8ce7n@googlegroups.com> <2023Feb3.080017@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1fe4bf28-32d5-4d43-b0fd-f53c3281bec5n@googlegroups.com>
Subject: Re: ARM Dis-assembler for GForth
From: brian....@brianfox.ca (Brian Fox)
Injection-Date: Fri, 03 Feb 2023 20:53:08 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4433
 by: Brian Fox - Fri, 3 Feb 2023 20:53 UTC

On Friday, February 3, 2023 at 2:17:50 AM UTC-5, Anton Ertl wrote:
> Brian Fox <bria...@brianfox.ca> writes:
> >A question came up on Reddit /Forth by a person with an Apple M1.
> >They tried to use SEE but code words would not dis-assemble.
> >Is there anyone thinking about making one in Forth?
> >Could gFoRTH be made to interface to gbd in a workable way?
> Gforth has had a gdb-based disassembler since 0.7. Some OSs
> (e.g. Ubuntu) by default maim the ptrace system call and disasm-gdb
> does not work there. On Ubuntu you can fix this with
>
> sudo echo 0 >/proc/sys/kernel/yama/ptrace_scope
>
> or (after the next reboot) by changing /etc/sysctl.d/10-ptrace.conf
>
> The development version of Gforth also has Forth disassemblers for the
> ARM A64 (aka Aarch64) and some 32-bit ARM instruction set:
>
> Here's on a A64 Ubuntu system with the fix above, using gforth-fast in
> either case:
>
> Gforth 0.7.3, Copyright (C) 1995-2008 Free Software Foundation, Inc.
> Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
> Type `bye' to exit
> see +
> Code +
> 0x0000aaaae8bfa884 <gforth_engine+3220>: ldr x0, [x23, #8]!
> 0x0000aaaae8bfa888 <gforth_engine+3224>: add x25, x25, #0x8
> 0x0000aaaae8bfa88c <gforth_engine+3228>: add x24, x24, x0
> 0x0000aaaae8bfa890 <gforth_engine+3232>: ldur x2, [x25, #-8]
> 0x0000aaaae8bfa894 <gforth_engine+3236>: br x2
> 0x0000aaaae8bfa898 <gforth_engine+3240>: ldur x2, [x25, #-8]
> 0x0000aaaae8bfa89c <gforth_engine+3244>: br x2
> 0x0000aaaae8bfa8a0 <gforth_engine+3248>: br x2
> 0x0000aaaae8bfa8a4 <gforth_engine+3252>: mov x4, x25
> 0x0000aaaae8bfa8a8 <gforth_engine+3256>: ldr x0, [x4], #8
> 0x0000aaaae8bfa8ac <gforth_engine+3260>: add x24, x0, x24
> 0x0000aaaae8bfa8b0 <gforth_engine+3264>: add x25, x4, #0x8
> 0x0000aaaae8bfa8b4 <gforth_engine+3268>: ldur x2, [x25, #-8]
> 0x0000aaaae8bfa8b8 <gforth_engine+3272>: br x2
> Warning: 'set logging off', an alias for the command 'set logging enabled', is deprecated.
> Use 'set logging enabled off'.
>
> end-code
>
> Gforth 0.7.9_20230114
> ...
> see +
> Code +
> AAAAADB6DF70: ldr x0, [x25,#0x8]!
> AAAAADB6DF74: add x26, x26, #0x8
> AAAAADB6DF78: add x27, x0, x27
> AAAAADB6DF7C: ldur x1, [x26,#-0x8]
> AAAAADB6DF80: br x1
> end-code
> ok
> ' disasm-gdb is discode ok
> see +
> Code +
> 0x0000aaaaadb6df70 <gforth_engine+2640>: ldr x0, [x25, #8]!
> 0x0000aaaaadb6df74 <gforth_engine+2644>: add x26, x26, #0x8
> 0x0000aaaaadb6df78 <gforth_engine+2648>: add x27, x0, x27
> 0x0000aaaaadb6df7c <gforth_engine+2652>: ldur x1, [x26, #-8]
> 0x0000aaaaadb6df80 <gforth_engine+2656>: br x1
> Warning: 'set logging off', an alias for the command 'set logging enabled', is deprecated.
> Use 'set logging enabled off'.
>
> end-code
>
> Development Gforth did not work on MacOS on Apple Silicon last time I
> tried it.
>
> - anton
> --
> M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
> comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
> New standard: https://forth-standard.org/
> EuroForth 2022: https://euro.theforth.net

Thanks Anton

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor