Replies: 26 comments 36 replies
-
On 3/28/25 02:05, Dariusz Knociński wrote:
Hi,
I recently tried to use m3gdb on FreeBSD 14.2/AMD64 and ran into three major obstacles:
a) When trying to compile m3gdb, the clang 18.1.6 compiler is selected by default. Unfortunately, compilation with this compiler fails:
|m3gdb$ cm3 -build … cc -c -g -O0 -I. -I../../gdb/gdb -I../../gdb/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/gdb/../include/opcode -I../../gdb/gdb/../readline/.. -I../bfd -I../../gdb/gdb/../bfd -I../../gdb/gdb/../include -I../intl -I../../gdb/gdb/../intl -DMI_OUT=1 -DTUI=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral -Wunused-label -Wunused-function ../../gdb/gdb/tui/tui-stack.c ../../gdb/gdb/tui/tui-stack.c:359:16: error: incompatible integer to pointer conversion passing 'CORE_ADDR' (aka 'unsigned long') to parameter of type 'CORE_ADDR *' (aka 'unsigned long *') [-Wint-conversion] 359 | &low, (CORE_ADDR) NULL) == 0) | ^~~~~~~~~~~~~~~~ ../../gdb/gdb/symtab.h:1117:21: note: passing argument to parameter here 1117 | CORE_ADDR *); | ^ 1 error generated. gmake[2]: *** [Makefile:3184: tui-stack.o] Error 1 |
b) Changing the compiler to GCC 14.2.1 20250315 causes errors already at the configuration stage of the build process:
|m3gdb$ CC=gcc14 cm3 -build ... checking for gcc... gcc14 checking whether the C compiler (gcc14 ) works... no configure: error: installation or configuration problem: C compiler cannot create executables. "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/m3-sys/m3gdb/src/m3makefile", line 41: quake runtime error: exit 1: MAKE=gmake MAKEINFO=: ../gdb/configure --disable-werror --procedure-- -line- -file--- exec -- <builtin> m3gdb_Run 41 /home/dknoto/Projekty/CriticalMass-Modula-3/Source/m3-sys/m3gdb/src/m3makefile include_dir 82 /home/dknoto/Projekty/CriticalMass-Modula-3/Source/m3-sys/m3gdb/src/m3makefile 4 /home/dknoto/Projekty/CriticalMass-Modula-3/Source/m3-sys/m3gdb/AMD64_FREEBSD/m3make.args Fatal Error: package build failed |
c) After changing to gcc13 13.3.0, compilation proceeds correctly and m3gcc builds:
***@***.*** m3gdb]$ ls -l AMD64_FREEBSD/ ... .rwxr-xr-x 11M dknoto laryssa 28 Mar 07:24 m3gdb* ... |
But unfortunately it doesn't work very well:
|(m3gdb) ***@***.*** Tutorial]$ m3gdb AMD64_FREEBSD/FmtTests --directory=src/ GNU gdb plus Modula-3 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-unknown-freebsd14.2"...Detected compiler kind: CM3 (INTEGER, m3cc). (m3gdb) list ... 21 BEGIN 22 23 IO.Put(DBG & NL); 24 IO.Put(DBG & " Test interfejsu Fmt:" & NL); 25 IO.Put(DBG & NL); (m3gdb) break 23 Breakpoint 1 at 0x2020d0: file FmtTests.m3, line 23. (m3gdb) run Starting program: /home/dknoto/Projekty/CriticalMass-Modula-3/Tutorial/AMD64_FREEBSD/FmtTests Error while mapping shared library sections: [vdso]: No error: 0. Error while reading shared library symbols: [vdso]: No such file or directory. Segmentation fault
(core dumped)|
This looks like a problem I found a fix for, but it's been a
long time. I'll look for the fix later today. It's an option
to not do PIC in the link step that GCC reversed the sense of
one release to the next. I saw no way to fix the git repo of
m3gdb that would adapt to differing GCC behavior. Nor did I
figure out just where the GCC version change happened.
… |... |
The system's GDB in the same scenario works fine, but the readability of the process from the Modula-3 point of view is abysmal:
|$ gdb AMD64_FREEBSD/FmtTests GNU gdb (GDB) 15.1 [GDB v15.1 for FreeBSD] Copyright (C) 2024 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-portbld-freebsd14.1". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from AMD64_FREEBSD/FmtTests... (gdb) list ... (gdb) list 48 49 50 int main (int argc, char** argv, char** envp) 51 { 52 RTLinker__InitRuntime (argc, (ADDRESS)argv, (ADDRESS)envp, 0); 53
RTLinker__AddUnit ((M3PROC)FmtTests_M3); 54 RTProcess__Exit (0); 55 return 0; 56 } 57 (gdb) break 53 Breakpoint 1 at 0x2020ae: file _m3main.cpp, line 53. (gdb) run Starting program: /home/dknoto/Projekty/CriticalMass-Modula-3/Tutorial/AMD64_FREEBSD/FmtTests Breakpoint 1, main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at _m3main.cpp:53 53 RTLinker__AddUnit ((M3PROC)FmtTests_M3); |
M3gdb is severely outdated compared to current gdb, version 6.4 vs. 15.1. Perhaps m3gdb sources should be updated?
Personally I don't know the inner structure of gdb but as a "slave" I can help ;-)
—
Reply to this email directly, view it on GitHub <#1202>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSVZNC6DZ3ZSSWDYOLQA6D2WTRENAVCNFSM6AAAAABZ6Z2WX2VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYGEZTSMZRG4>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
You might try -nopie in the link step building m3gdb.
I think -nopic is already the default in compiles.
…On 3/28/25 07:57, Rodney Bates wrote:
On 3/28/25 02:05, Dariusz Knociński wrote:
>
> Hi,
>
> I recently tried to use m3gdb on FreeBSD 14.2/AMD64 and ran into three major obstacles:
>
> a) When trying to compile m3gdb, the clang 18.1.6 compiler is selected by default. Unfortunately, compilation with this compiler fails:
>
> |m3gdb$ cm3 -build … cc -c -g -O0 -I. -I../../gdb/gdb -I../../gdb/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/gdb/../include/opcode -I../../gdb/gdb/../readline/.. -I../bfd -I../../gdb/gdb/../bfd -I../../gdb/gdb/../include -I../intl -I../../gdb/gdb/../intl -DMI_OUT=1 -DTUI=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral -Wunused-label -Wunused-function ../../gdb/gdb/tui/tui-stack.c ../../gdb/gdb/tui/tui-stack.c:359:16: error: incompatible integer to pointer conversion passing 'CORE_ADDR' (aka 'unsigned long') to parameter of type 'CORE_ADDR *' (aka 'unsigned long *') [-Wint-conversion] 359 | &low, (CORE_ADDR) NULL) == 0) | ^~~~~~~~~~~~~~~~ ../../gdb/gdb/symtab.h:1117:21: note: passing argument to parameter here 1117 | CORE_ADDR *); | ^ 1 error generated. gmake[2]: *** [Makefile:3184: tui-stack.o] Error 1 |
>
> b) Changing the compiler to GCC 14.2.1 20250315 causes errors already at the configuration stage of the build process:
>
> |m3gdb$ CC=gcc14 cm3 -build ... checking for gcc... gcc14 checking whether the C compiler (gcc14 ) works... no configure: error: installation or configuration problem: C compiler cannot create executables. "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/m3-sys/m3gdb/src/m3makefile", line 41: quake runtime error: exit 1: MAKE=gmake MAKEINFO=: ../gdb/configure --disable-werror --procedure-- -line- -file--- exec -- <builtin> m3gdb_Run 41 /home/dknoto/Projekty/CriticalMass-Modula-3/Source/m3-sys/m3gdb/src/m3makefile include_dir 82 /home/dknoto/Projekty/CriticalMass-Modula-3/Source/m3-sys/m3gdb/src/m3makefile 4 /home/dknoto/Projekty/CriticalMass-Modula-3/Source/m3-sys/m3gdb/AMD64_FREEBSD/m3make.args Fatal Error: package build failed |
>
> c) After changing to gcc13 13.3.0, compilation proceeds correctly and m3gcc builds:
>
> ***@***.*** m3gdb]$ ls -l AMD64_FREEBSD/ ... .rwxr-xr-x 11M dknoto laryssa 28 Mar 07:24 m3gdb* ... |
>
> But unfortunately it doesn't work very well:
>
> |(m3gdb) ***@***.*** Tutorial]$ m3gdb AMD64_FREEBSD/FmtTests --directory=src/ GNU gdb plus Modula-3 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-unknown-freebsd14.2"...Detected compiler kind: CM3 (INTEGER, m3cc). (m3gdb) list ... 21 BEGIN 22 23 IO.Put(DBG & NL); 24 IO.Put(DBG & " Test interfejsu Fmt:" & NL); 25 IO.Put(DBG & NL); (m3gdb) break 23 Breakpoint 1 at 0x2020d0: file FmtTests.m3, line 23. (m3gdb) run Starting program: /home/dknoto/Projekty/CriticalMass-Modula-3/Tutorial/AMD64_FREEBSD/FmtTests Error while mapping shared library sections: [vdso]: No error: 0. Error while reading shared library symbols: [vdso]: No such file or directory. Segmentation fault
> (core dumped)|
This looks like a problem I found a fix for, but it's been a
long time. I'll look for the fix later today. It's an option
to not do PIC in the link step that GCC reversed the sense of
one release to the next. I saw no way to fix the git repo of
m3gdb that would adapt to differing GCC behavior. Nor did I
figure out just where the GCC version change happened.
> |... |
>
> The system's GDB in the same scenario works fine, but the readability of the process from the Modula-3 point of view is abysmal:
>
> |$ gdb AMD64_FREEBSD/FmtTests GNU gdb (GDB) 15.1 [GDB v15.1 for FreeBSD] Copyright (C) 2024 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-portbld-freebsd14.1". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from AMD64_FREEBSD/FmtTests... (gdb) list ... (gdb) list 48 49 50 int main (int argc, char** argv, char** envp) 51 { 52 RTLinker__InitRuntime (argc, (ADDRESS)argv, (ADDRESS)envp, 0); 53
> RTLinker__AddUnit ((M3PROC)FmtTests_M3); 54 RTProcess__Exit (0); 55 return 0; 56 } 57 (gdb) break 53 Breakpoint 1 at 0x2020ae: file _m3main.cpp, line 53. (gdb) run Starting program: /home/dknoto/Projekty/CriticalMass-Modula-3/Tutorial/AMD64_FREEBSD/FmtTests Breakpoint 1, main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at _m3main.cpp:53 53 RTLinker__AddUnit ((M3PROC)FmtTests_M3); |
>
> M3gdb is severely outdated compared to current gdb, version 6.4 vs. 15.1. Perhaps m3gdb sources should be updated?
>
> Personally I don't know the inner structure of gdb but as a "slave" I can help ;-)
>
> —
> Reply to this email directly, view it on GitHub <#1202>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSVZNC6DZ3ZSSWDYOLQA6D2WTRENAVCNFSM6AAAAABZ6Z2WX2VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZYGEZTSMZRG4>.
> You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
As I recall, no-pie was the needed one.
…On 3/28/25 15:40, Dariusz Knociński wrote:
I added the “-fno-pic” flag but it didn't help:
***@***.*** m3gdb]$ CC=gcc13 CFLAGS="-fno-pic" cm3 -build |
Simplest scenario:
***@***.*** Tutorial]$ m3gdb AMD64_FREEBSD/FmtTests GNU gdb plus Modula-3 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-unknown-freebsd14.2"...Detected compiler kind: CM3 (INTEGER, m3cc). (m3gdb) run Starting program: /home/dknoto/Projekty/CriticalMass-Modula-3/Tutorial/AMD64_FREEBSD/FmtTests Error while mapping shared library sections: [vdso]: No error: 0. Error while reading shared library symbols: [vdso]: No such file or directory. Segmentation fault (core dumped) |
—
Reply to this email directly, view it on GitHub <#1202 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSVZNAOPQD6FRSDE6X7F232WWQULAVCNFSM6AAAAABZ6Z2WX2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENRVHAYTGMQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Possible dublicate: Please see #41 (comment) There are some details:
^^^^ it is optional fragment
^^^^ it is necessary to use m3gdb |
Beta Was this translation helpful? Give feedback.
-
P.S. It :
is strange in any key Please, see
|
Beta Was this translation helpful? Give feedback.
-
D.K} 01.04.2025, 18:55 I know but I wanted to practice the official stable version. I have the whole repository locally so I will try the devel version.
But "my branch" contain a patch by Rodney Bates related compiling m3gdb.
…----------------
Кому: modula3/cm3 ***@***.***);
Копия: Comment ***@***.***);
Тема: [modula3/cm3] Problems with m3gdb on FreeBSD 14.2/AMD64. (Discussion #1202);
01.04.2025, 18:55, "Dariusz Knociński" ***@***.***>:
I know but I wanted to practice the official stable version. I have the whole repository locally so I will try the devel version.
|
Beta Was this translation helpful? Give feedback.
-
Victor I tried to upgrade cm3 from the current master but the process failed:
[master] $ scripts/concierge.py full-upgrade
( I will send info "step by step". After this I edit all this in Web interface of GitHub site)
2) DM3_BACKEND_MODE=C -- it isn't be a best choice...
1) scripts/concierge.py
Personal I don't use Eric Sessoms script ( a-ka Wiki method) very often...Usually I use "boot2.py method"
To be continued...
…----------------
Кому: modula3/cm3 ***@***.***);
Копия: Comment ***@***.***);
Тема: [modula3/cm3] Problems with m3gdb on FreeBSD 14.2/AMD64. (Discussion #1202);
01.04.2025, 19:47, "Dariusz Knociński" ***@***.***>:
Victor I tried to upgrade cm3 from the current master but the process failed:
[master] $ scripts/concierge.py full-upgrade
...
cd /home/dknoto/Projekty/CriticalMass-Modula-3/Source/m3-libs/m3core
/home/dknoto/cm3-clang-18/bin/cm3 -build -DBUILD_DIR=AMD64_FREEBSD -DROOT=/home/dknoto/Projekty/CriticalMass-Modula-3/Source -DTARGET=AMD64_FREEBSD -DM3_BACKEND_MODE=C
Traceback (most recent call last):
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 1823, in <module>
Concierge().main()
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 1757, in main
command.execute()
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 1424, in execute
self.buildship(self.packages())
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 1072, in executor
action.execute(paths)
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 845, in execute
self.execute_path(package_path)
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 969, in execute_path
self._buildglobal.execute_path(package_path)
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 919, in execute_path
self.run(package_path, ["-build"])
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 870, in run
proc.check_returncode()
File "/usr/local/lib/python3.11/subprocess.py", line 502, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['/home/dknoto/cm3-clang-18/bin/cm3', '-build', '-DBUILD_DIR=AMD64_FREEBSD', '-DROOT=/home/dknoto/Projekty/CriticalMass-Modula-3/Source', '-DTARGET=AMD64_FREEBSD', '-DM3_BACKEND_MODE=C']' died with <Signals.SIGBUS: 10>.
$ ~/cm3-clang-18/bin/cm3 --version
Bus error (core dumped)
|
Beta Was this translation helpful? Give feedback.
-
On 3/28/25 16:32, Dariusz Knociński wrote:
Gcc13 does not have the |-fno-pie| option listed, but it was able to compile m3gdb with such an option.
Ah, this does not look like the -no-pie issue I had.
rebasing m3gdb on a later gdb could be a lot of work.
I have done this in the past, twice as I recall. gdb
has seen a lot of development since, I believe. That
was a long time ago. It would probably be a lot less
work to diagnose and fix the current m3gdb. I have
AMD64_LINUX. I haven't recompiled m3gdb in a while.
Do you think a copy of my working executable would be
worth trying?
To get the m3-specific capabilities, it has to be
-gstabs+. It knows noting of dwarf, tho' I really
wish it did.
Also, I have never tried llvm either on m3gdb or code
being debugged.
I have occasionally used gdb on m3gdb successfully.
The m3gdb I use is working with the current modula3-ized
gcc back end,
…
Unfortunately still the same thing, segmentation fault
—
Reply to this email directly, view it on GitHub <#1202 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSVZNAFC464C3TWPLYF62T2WWWVHAVCNFSM6AAAAABZ6Z2WX2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENRVHA2TKOA>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
( I on smartphone now... Sorry for minimum details...)
1) Compile this ( after unpacking of .txz ):
https://github.com/VictorMiasnikov/cm3/releases/download/d5.11.9-ZZYYXX-20241118_21-50/cm3-boot-AMD64_LINUX-d5.11.9-20250214_22-43.tar.xz
by run me make
2) Run `boot2min.py c`
3) Compile m3cc . Highly recommend pack folder before `cm3 -ship`
4) Pack cm3 binary file
5) Upgrade all. ( May be do "make distrib" first...)
ToDo: add details
…----------------
Кому: modula3/cm3 ***@***.***);
Копия: Comment ***@***.***);
Тема: [modula3/cm3] Problems with m3gdb on FreeBSD 14.2/AMD64. (Discussion #1202);
01.04.2025, 19:47, "Dariusz Knociński" ***@***.***>:
Victor I tried to upgrade cm3 from the current master but the process failed:
[master] $ scripts/concierge.py full-upgrade
...
cd /home/dknoto/Projekty/CriticalMass-Modula-3/Source/m3-libs/m3core
/home/dknoto/cm3-clang-18/bin/cm3 -build -DBUILD_DIR=AMD64_FREEBSD -DROOT=/home/dknoto/Projekty/CriticalMass-Modula-3/Source -DTARGET=AMD64_FREEBSD -DM3_BACKEND_MODE=C
Traceback (most recent call last):
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 1823, in <module>
Concierge().main()
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 1757, in main
command.execute()
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 1424, in execute
self.buildship(self.packages())
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 1072, in executor
action.execute(paths)
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 845, in execute
self.execute_path(package_path)
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 969, in execute_path
self._buildglobal.execute_path(package_path)
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 919, in execute_path
self.run(package_path, ["-build"])
File "/home/dknoto/Projekty/CriticalMass-Modula-3/Source/scripts/concierge.py", line 870, in run
proc.check_returncode()
File "/usr/local/lib/python3.11/subprocess.py", line 502, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['/home/dknoto/cm3-clang-18/bin/cm3', '-build', '-DBUILD_DIR=AMD64_FREEBSD', '-DROOT=/home/dknoto/Projekty/CriticalMass-Modula-3/Source', '-DTARGET=AMD64_FREEBSD', '-DM3_BACKEND_MODE=C']' died with <Signals.SIGBUS: 10>.
$ ~/cm3-clang-18/bin/cm3 --version
Bus error (core dumped)
|
Beta Was this translation helpful? Give feedback.
-
I compiled cm3 and m3gdb on the latest master with FreeBSD config additions:
m3gdb no longer crashes but it is still a little short of full happiness:
|
Beta Was this translation helpful? Give feedback.
-
What method are you using to compile m3gdb? Through cm3 or directly, with configure and make?
Have you looked at docs/help/m3gdb/m,3gdb-onepage.html? Anything in there that might help?
…On 4/2/25 05:43, Dariusz Knociński wrote:
@VictorMiasnikov <https://github.com/VictorMiasnikov> thank you very much for the sugetions but until the weekend I do not have time for intensive testing. I will analyze what you wrote and try to apply it as best as I can.
—
Reply to this email directly, view it on GitHub <#1202 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSVZNHTN65PS5P22HHJQK32XO5O3AVCNFSM6AAAAABZ6Z2WX2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENRZHEYTAMY>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I found a moment of time yesterday and would like to summarize my experience with m3gdb:
At this point, that's all I wanted to convey. |
Beta Was this translation helpful? Give feedback.
-
On 4/3/25 07:41, Dariusz Knociński wrote:
I found a moment of time yesterday and would like to summarize my experience with m3gdb:
* I did a zero installation of cm3 with cm3-dist-AMD64_LINDUX-d5.11.4.tar.xz according to the recipe from the Wiki for FreeBSD;
* I downloaded the current cm3 repository from github (9ba4316 <9ba4316>);
* I set the following options in m3-sys/cminstall/src/config/AMD64_FREEBSD:
|readonly TARGET = "AMD64_FREEBSD" readonly GNU_PLATFORM = "amd64-freebsd" % "cpu-os" string for GNU SYSTEM_CC = "g++14 -fPIC -O3 -march=native -gdwarf-2 "|
This -gdwarf werewolf just won't die.
It has to be -gstabs+ for m3gdb to work. But I'm not sure
SYSTEM_CC is the place to get debug options into the cm3 front end.
Also, I think most any debugger would be pretty hamstrung by
-O3 or any level of optimization at all. Optimizations remove
or change a lot of stuff a debugger needs to know.
LLVM are fond of telling us their optimizations don't undermine
debugging, but I think that requires stuff in llvm that is
specific to the source language. And that only works for dwarf,
which m3gdb would need a lot of work to handle.
… |readonly SYSTEM_ASM = "as -64" readonly POSITION_INDEPENDENT_EXECUTABLE = "-no-pie" include("AMD64.common") include("FreeBSD.common") |
* I built the upgrade and installed it usingt scripts/concierge.py:
|[cm3 source] $ scripts/concierge.py build [cm3 source] $ scripts/concierge.py install |
* I built m3gdb with the following command:
|CC=gcc13 CFLAGS="-no-pie" cm3 -build cm3 -ship |
* After these operations, cm3 and m3gdb return the following information about their versions:
|Critical Mass Modula-3 version d5.11.9 GitInfo: /commit/f5ff0872fe8a4e9def576d3383a4a8bceb9a259e /commits/freebsd remote: revision: f5ff0872fe8a4e9def576d3383a4a8bceb9a259e branch: freebsd last updated: 2022-02-05 compiled: 2025-04- 2 21:19:02 configuration: /home/dknoto/cm3/bin/cm3.cfg host: AMD64_FREEBSD target: AMD64_FREEBSD |
|GNU gdb plus Modula-3 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-unknown-freebsd14.2". |
* I compiled the sources of my test program:
|[FmtTests] $ cm3 -build -verbose … new source -> compiling FmtTests.m3 m3front ../src/FmtTests.m3 -unfold_nested_procs -check_procs -w1 g++14 -fPIC -O3 -march=native -gdwarf-2 -g -c FmtTests.m3.cpp -o FmtTests_m.o compile_c => 0 **** PARALLEL BACK-END BUILD, M3_PARALLEL_BACK = 20 g++14 -fPIC -O3 -march=native -gdwarf-2 -g -c FmtTests.m3.cpp -o FmtTests_m.o rm FmtTests.m3.cpp exhale FmtTests.mx -> linking FmtTests generate _m3main.cpp g++14 -fPIC -O3 -march=native -gdwarf-2 -g -c _m3main.cpp -o _m3main.o compile_c => 0 g++14 -fPIC -O3 -march=native -gdwarf-2 -Wl,-z,now -Wl,-z,origin -Bsymbolic -Wl,--fatal-warnings -Wl,-rpath,\$ORIGIN -Wl,-rpath,\$ORIGIN/../lib -Wl,--warn-common -Wl,-rpath,/home/dknoto/cm3/bin/../lib -o FmtTests _m3main.o FmtTests_m.o -L/home/dknoto/cm3/pkg/libm3/AMD64_FREEBSD -lm3 -L/home/dknoto/cm3/pkg/m3core/AMD64_FREEBSD -lm3core -lm -pthread -no-pie m3_link => 0 seconds #times operation 0.01 1 compiling Modula-3 -> IL 0.17 2 compiling C -> object 0.03 1
linking 0.02 6 garbage collection --------------------------------------------------- 0.22 TOTAL rm m3make.args cd .. is_empty (AMD64_FREEBSD) => .M3SHIP |
* I run m3gdb, the program does not crash but works very strangely:
* |m3gdb AMD64_FREEBSD/FmtTests --directory=src|:
|GNU gdb plus Modula-3 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-unknown-freebsd14.2"...Detected compiler kind: CM3 (INTEGER, m3cc). |
* |(m3gdb) break 45|:
|Breakpoint 1 at 0x400fa9: file FmtTests.m3, line 45. |
* |(m3gdb) run|:
|Starting program: /home/dknoto/Projekty/CriticalMass-Modula-3/Tutorial/FmtTests/AMD64_FREEBSD/FmtTests Error while mapping shared library sections: [vdso]: No error: 0. Error while reading shared library symbols: [vdso]: No such file or directory. Can't disable VM GC. Breakpoint 1, FmtTests (mode_L_67=Unhandled dwarf expression opcode 0xf3 ) at FmtTests.m3:272 272 IO.Put(DBG & " a: „%3s…%3s”, {t1, …, t6} => „" & Fmt.FN("%3s%3s%3s%3s%3s%3s", ARRAY OF TEXT { "t1", "t2", "t3", "t4", "t5", "t6" }) & "”" & NL); Current language: auto; currently c++ |
* |(m3gdb) print znak|:
|No symbol "znak" in current context. |
* Although in the source code I have something like this:
|... 12 VAR 13 znak : CHAR; ... 44 znak := '~'; 45 INC(znak); ... |
At this point, that's all I wanted to convey.
—
Reply to this email directly, view it on GitHub <#1202 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSVZNBRAHW4X5JZQ5YEKK32XUT63AVCNFSM6AAAAABZ6Z2WX2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENZRGMZTONY>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Victor your emails are completely unreadable :( |
Beta Was this translation helpful? Give feedback.
-
OK, some background is needed here and a couple of misconceptions corrected.
m3cc is not the integrated back end. The integrated backend is in m3back.
It is written in Modula-3 and generates code only for intel/amd 32-bit and 64-bit
processors. It is linked in to the cm3 executable. It produces stabs debug
info that m3gdb uses, but I am not sure it is entirely complete, for m3gdb's use.
The C back end is also in m3back. It does not produce any debug info itself,
but when its output is run through a C compiler, the C compiler produces
whatever kind of debug info it is asked for, for the C code only.
m3cc is the gcc-derived back end. It is effectively a fork of a gcc version,
currently 4.7, with a lot of front end stuff stripped out. Obviously it is
written in C. It includes a file added by the modula-3 project, also written in
C, that reads output produced by cm3, in cm3's own internal IR, and
converts to one of gcc's internal data structures. It will procdce code
for any of several targets, as it is asked-for.
Historically, it has been updated a few times to more recent gcc versions,
but for now, there doesn't seem to be a lot of motivation to repeat that.
m3gdb is a fork of gdb, currently version 6.4, with a fair amount of added
code for Modula-3 debugging, written in C. It too has historically been
updated to more recent gdb versions.
m3gdb does *NOT* do anything meaningful with any dwarf debug info. It does
contain code inherited from gdb, that reads dwarf info and translates into
internal data structure, but m3gdb's Modula-3-specific features do not
use it. So if you compile your Modula-3 code with -gdwarf2 and try to
debug with m3gdb, you will get no more than what you would by using gdb 6.4.
Nothing specific to Modula-3.
So if your want such Modula-3-specific debugging features as exist anywhere,
compile your to-be-debugged code using the gcc-derived back end and -gstabs+.
As an aside, It really isn't exactly stabs. The stabs definition has one or
two fields that can contain any character string. The cm3 front-end and m3gdb
have their own Modula-3-specific info that they mutually agree on and enclose
it into these fields. So it is treating stabs as just a container for its
own info. The things in between cm3 and m3gdb just pass it through unchanged.
…On 4/3/25 10:10, Rodney Bates wrote:
On 4/3/25 07:41, Dariusz Knociński wrote:
>
> I found a moment of time yesterday and would like to summarize my experience with m3gdb:
>
> * I did a zero installation of cm3 with cm3-dist-AMD64_LINDUX-d5.11.4.tar.xz according to the recipe from the Wiki for FreeBSD;
> * I downloaded the current cm3 repository from github (9ba4316 <9ba4316>);
> * I set the following options in m3-sys/cminstall/src/config/AMD64_FREEBSD:
>
> |readonly TARGET = "AMD64_FREEBSD" readonly GNU_PLATFORM = "amd64-freebsd" % "cpu-os" string for GNU SYSTEM_CC = "g++14 -fPIC -O3 -march=native -gdwarf-2 "|
This -gdwarf werewolf just won't die.
It has to be -gstabs+ for m3gdb to work. But I'm not sure
SYSTEM_CC is the place to get debug options into the cm3 front end.
Also, I think most any debugger would be pretty hamstrung by
-O3 or any level of optimization at all. Optimizations remove
or change a lot of stuff a debugger needs to know.
LLVM are fond of telling us their optimizations don't undermine
debugging, but I think that requires stuff in llvm that is
specific to the source language. And that only works for dwarf,
which m3gdb would need a lot of work to handle.
> |readonly SYSTEM_ASM = "as -64" readonly POSITION_INDEPENDENT_EXECUTABLE = "-no-pie" include("AMD64.common") include("FreeBSD.common") |
>
> * I built the upgrade and installed it usingt scripts/concierge.py:
>
> |[cm3 source] $ scripts/concierge.py build [cm3 source] $ scripts/concierge.py install |
>
> * I built m3gdb with the following command:
>
> |CC=gcc13 CFLAGS="-no-pie" cm3 -build cm3 -ship |
>
> * After these operations, cm3 and m3gdb return the following information about their versions:
>
> |Critical Mass Modula-3 version d5.11.9 GitInfo: /commit/f5ff0872fe8a4e9def576d3383a4a8bceb9a259e /commits/freebsd remote: revision: f5ff0872fe8a4e9def576d3383a4a8bceb9a259e branch: freebsd last updated: 2022-02-05 compiled: 2025-04- 2 21:19:02 configuration: /home/dknoto/cm3/bin/cm3.cfg host: AMD64_FREEBSD target: AMD64_FREEBSD |
> |GNU gdb plus Modula-3 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-unknown-freebsd14.2". |
>
> * I compiled the sources of my test program:
>
> |[FmtTests] $ cm3 -build -verbose … new source -> compiling FmtTests.m3 m3front ../src/FmtTests.m3 -unfold_nested_procs -check_procs -w1 g++14 -fPIC -O3 -march=native -gdwarf-2 -g -c FmtTests.m3.cpp -o FmtTests_m.o compile_c => 0 **** PARALLEL BACK-END BUILD, M3_PARALLEL_BACK = 20 g++14 -fPIC -O3 -march=native -gdwarf-2 -g -c FmtTests.m3.cpp -o FmtTests_m.o rm FmtTests.m3.cpp exhale FmtTests.mx -> linking FmtTests generate _m3main.cpp g++14 -fPIC -O3 -march=native -gdwarf-2 -g -c _m3main.cpp -o _m3main.o compile_c => 0 g++14 -fPIC -O3 -march=native -gdwarf-2 -Wl,-z,now -Wl,-z,origin -Bsymbolic -Wl,--fatal-warnings -Wl,-rpath,\$ORIGIN -Wl,-rpath,\$ORIGIN/../lib -Wl,--warn-common -Wl,-rpath,/home/dknoto/cm3/bin/../lib -o FmtTests _m3main.o FmtTests_m.o -L/home/dknoto/cm3/pkg/libm3/AMD64_FREEBSD -lm3 -L/home/dknoto/cm3/pkg/m3core/AMD64_FREEBSD -lm3core -lm -pthread -no-pie m3_link => 0 seconds #times operation 0.01 1 compiling Modula-3 -> IL 0.17 2 compiling C -> object 0.03
> 1 linking 0.02 6 garbage collection --------------------------------------------------- 0.22 TOTAL rm m3make.args cd .. is_empty (AMD64_FREEBSD) => .M3SHIP |
>
> * I run m3gdb, the program does not crash but works very strangely:
> * |m3gdb AMD64_FREEBSD/FmtTests --directory=src|:
>
> |GNU gdb plus Modula-3 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-unknown-freebsd14.2"...Detected compiler kind: CM3 (INTEGER, m3cc). |
>
> * |(m3gdb) break 45|:
>
> |Breakpoint 1 at 0x400fa9: file FmtTests.m3, line 45. |
>
> * |(m3gdb) run|:
>
> |Starting program: /home/dknoto/Projekty/CriticalMass-Modula-3/Tutorial/FmtTests/AMD64_FREEBSD/FmtTests Error while mapping shared library sections: [vdso]: No error: 0. Error while reading shared library symbols: [vdso]: No such file or directory. Can't disable VM GC. Breakpoint 1, FmtTests (mode_L_67=Unhandled dwarf expression opcode 0xf3 ) at FmtTests.m3:272 272 IO.Put(DBG & " a: „%3s…%3s”, {t1, …, t6} => „" & Fmt.FN("%3s%3s%3s%3s%3s%3s", ARRAY OF TEXT { "t1", "t2", "t3", "t4", "t5", "t6" }) & "”" & NL); Current language: auto; currently c++ |
>
> * |(m3gdb) print znak|:
>
> |No symbol "znak" in current context. |
>
> * Although in the source code I have something like this:
>
> |... 12 VAR 13 znak : CHAR; ... 44 znak := '~'; 45 INC(znak); ... |
>
> At this point, that's all I wanted to convey.
>
> —
> Reply to this email directly, view it on GitHub <#1202 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSVZNBRAHW4X5JZQ5YEKK32XUT63AVCNFSM6AAAAABZ6Z2WX2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENZRGMZTONY>.
> You are receiving this because you commented.Message ID: ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
On 4/6/25 14:02, VictorMiasnikov wrote:
Are You sure about 64 bit in integrated backend?Exactly we don't need native backend ( a-ka "m2cc using")?I try IB on AMD64_NT without success ----------------
Well, I don't remember whether I ever tried to use it. The files and code in
m3back have lots of things that suggest somebody at least tried to
implement it.
I use the gcc-derived back end, -gstabs+, and m3gdb all the time with
success (well not counting the limits of m3gdb.)
… Кому: modula3/cm3 ***@***.***), modula3/cm3 ***@***.***);
Копия: Mention ***@***.***);
Тема: [modula3/cm3] Problems with m3gdb on FreeBSD 14.2/AMD64. (Discussion #1202);
06.04.2025, 21:57, ***@***.***" ***@***.***>:
On my screenshot - stabs+ I even forget that I've set it sience 2022----------------
Кому: modula3/cm3 ***@***.***);
Копия: Mention ***@***.***);
Тема: [modula3/cm3] Problems with m3gdb on FreeBSD 14.2/AMD64. (Discussion #1202);
06.04.2025, 19:52, "Rodney M. Bates" ***@***.***>:
OK, some background is needed here and a couple of misconceptions corrected.
m3cc is not the integrated back end. The integrated backend is in m3back.
It is written in Modula-3 and generates code only for intel/amd 32-bit and 64-bit
processors. It is linked in to the cm3 executable. It produces stabs debug
info that m3gdb uses, but I am not sure it is entirely complete, for m3gdb's use.
The C back end is also in m3back. It does not produce any debug info itself,
but when its output is run through a C compiler, the C compiler produces
whatever kind of debug info it is asked for, for the C code only.
m3cc is the gcc-derived back end. It is effectively a fork of a gcc version,
currently 4.7, with a lot of front end stuff stripped out. Obviously it is
written in C. It includes a file added by the modula-3 project, also written in
C, that reads output produced by cm3, in cm3's own internal IR, and
converts to one of gcc's internal data structures. It will procdce code
for any of several targets, as it is asked-for.
Historically, it has been updated a few times to more recent gcc versions,
but for now, there doesn't seem to be a lot of motivation to repeat that.
m3gdb is a fork of gdb, currently version 6.4, with a fair amount of added
code for Modula-3 debugging, written in C. It too has historically been
updated to more recent gdb versions.
m3gdb does *NOT* do anything meaningful with any dwarf debug info. It does
contain code inherited from gdb, that reads dwarf info and translates into
internal data structure, but m3gdb's Modula-3-specific features do not
use it. So if you compile your Modula-3 code with -gdwarf2 and try to
debug with m3gdb, you will get no more than what you would by using gdb 6.4.
Nothing specific to Modula-3.
So if your want such Modula-3-specific debugging features as exist anywhere,
compile your to-be-debugged code using the gcc-derived back end and -gstabs+.
As an aside, It really isn't exactly stabs. The stabs definition has one or
two fields that can contain any character string. The cm3 front-end and m3gdb
have their own Modula-3-specific info that they mutually agree on and enclose
it into these fields. So it is treating stabs as just a container for its
own info. The things in between cm3 and m3gdb just pass it through unchanged.
On 4/3/25 10:10, Rodney Bates wrote:
>
>
> On 4/3/25 07:41, Dariusz Knociński wrote:
>>
>> I found a moment of time yesterday and would like to summarize my experience with m3gdb:
>>
>> * I did a zero installation of cm3 with cm3-dist-AMD64_LINDUX-d5.11.4.tar.xz according to the recipe from the Wiki for FreeBSD;
>> * I downloaded the current cm3 repository from github (9ba4316 <9ba4316>);
>> * I set the following options in m3-sys/cminstall/src/config/AMD64_FREEBSD:
>>
>> |readonly TARGET = "AMD64_FREEBSD" readonly GNU_PLATFORM = "amd64-freebsd" % "cpu-os" string for GNU SYSTEM_CC = "g++14 -fPIC -O3 -march=native -gdwarf-2 "|
> This -gdwarf werewolf just won't die.
> It has to be -gstabs+ for m3gdb to work. But I'm not sure
> SYSTEM_CC is the place to get debug options into the cm3 front end.
>
> Also, I think most any debugger would be pretty hamstrung by
> -O3 or any level of optimization at all. Optimizations remove
> or change a lot of stuff a debugger needs to know.
>
> LLVM are fond of telling us their optimizations don't undermine
> debugging, but I think that requires stuff in llvm that is
> specific to the source language. And that only works for dwarf,
> which m3gdb would need a lot of work to handle.
>
>> |readonly SYSTEM_ASM = "as -64" readonly POSITION_INDEPENDENT_EXECUTABLE = "-no-pie" include("AMD64.common") include("FreeBSD.common") |
>>
>> * I built the upgrade and installed it usingt scripts/concierge.py:
>>
>> |[cm3 source] $ scripts/concierge.py build [cm3 source] $ scripts/concierge.py install |
>>
>> * I built m3gdb with the following command:
>>
>> |CC=gcc13 CFLAGS="-no-pie" cm3 -build cm3 -ship |
>>
>> * After these operations, cm3 and m3gdb return the following information about their versions:
>>
>> |Critical Mass Modula-3 version d5.11.9 GitInfo: /commit/f5ff0872fe8a4e9def576d3383a4a8bceb9a259e /commits/freebsd remote: revision: f5ff0872fe8a4e9def576d3383a4a8bceb9a259e branch: freebsd last updated: 2022-02-05 compiled: 2025-04- 2 21:19:02 configuration: /home/dknoto/cm3/bin/cm3.cfg host: AMD64_FREEBSD target: AMD64_FREEBSD |
>> |GNU gdb plus Modula-3 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-unknown-freebsd14.2". |
>>
>> * I compiled the sources of my test program:
>>
>> |[FmtTests] $ cm3 -build -verbose … new source -> compiling FmtTests.m3 m3front ../src/FmtTests.m3 -unfold_nested_procs -check_procs -w1 g++14 -fPIC -O3 -march=native -gdwarf-2 -g -c FmtTests.m3.cpp -o FmtTests_m.o compile_c => 0 **** PARALLEL BACK-END BUILD, M3_PARALLEL_BACK = 20 g++14 -fPIC -O3 -march=native -gdwarf-2 -g -c FmtTests.m3.cpp -o FmtTests_m.o rm FmtTests.m3.cpp exhale FmtTests.mx -> linking FmtTests generate _m3main.cpp g++14 -fPIC -O3 -march=native -gdwarf-2 -g -c _m3main.cpp -o _m3main.o compile_c => 0 g++14 -fPIC -O3 -march=native -gdwarf-2 -Wl,-z,now -Wl,-z,origin -Bsymbolic -Wl,--fatal-warnings -Wl,-rpath,\$ORIGIN -Wl,-rpath,\$ORIGIN/../lib -Wl,--warn-common -Wl,-rpath,/home/dknoto/cm3/bin/../lib -o FmtTests _m3main.o FmtTests_m.o -L/home/dknoto/cm3/pkg/libm3/AMD64_FREEBSD -lm3 -L/home/dknoto/cm3/pkg/m3core/AMD64_FREEBSD -lm3core -lm -pthread -no-pie m3_link => 0 seconds #times operation 0.01 1 compiling Modula-3 -> IL 0.17 2 compiling C -> object 0.03
>> 1 linking 0.02 6 garbage collection --------------------------------------------------- 0.22 TOTAL rm m3make.args cd .. is_empty (AMD64_FREEBSD) => .M3SHIP |
>>
>> * I run m3gdb, the program does not crash but works very strangely:
>> * |m3gdb AMD64_FREEBSD/FmtTests --directory=src|:
>>
>> |GNU gdb plus Modula-3 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-unknown-freebsd14.2"...Detected compiler kind: CM3 (INTEGER, m3cc). |
>>
>> * |(m3gdb) break 45|:
>>
>> |Breakpoint 1 at 0x400fa9: file FmtTests.m3, line 45. |
>>
>> * |(m3gdb) run|:
>>
>> |Starting program: /home/dknoto/Projekty/CriticalMass-Modula-3/Tutorial/FmtTests/AMD64_FREEBSD/FmtTests Error while mapping shared library sections: [vdso]: No error: 0. Error while reading shared library symbols: [vdso]: No such file or directory. Can't disable VM GC. Breakpoint 1, FmtTests (mode_L_67=Unhandled dwarf expression opcode 0xf3 ) at FmtTests.m3:272 272 IO.Put(DBG & " a: „%3s…%3s”, {t1, …, t6} => „" & Fmt.FN("%3s%3s%3s%3s%3s%3s", ARRAY OF TEXT { "t1", "t2", "t3", "t4", "t5", "t6" }) & "”" & NL); Current language: auto; currently c++ |
>>
>> * |(m3gdb) print znak|:
>>
>> |No symbol "znak" in current context. |
>>
>> * Although in the source code I have something like this:
>>
>> |... 12 VAR 13 znak : CHAR; ... 44 znak := '~'; 45 INC(znak); ... |
>>
>> At this point, that's all I wanted to convey.
>>
>> —
>> Reply to this email directly, view it on GitHub <#1202 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSVZNBRAHW4X5JZQ5YEKK32XUT63AVCNFSM6AAAAABZ6Z2WX2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENZRGMZTONY>.
>> You are receiving this because you commented.Message ID: ***@***.***>
>>
>
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub <#1202 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSVZNCWEONE6YVDRQTZKG32YF23ZAVCNFSM6AAAAABZ6Z2WX2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENZUGMYDOMY>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@RodneyBates I found inaccuracies in the m3gdb documentation:
When you add the phrase
|
Beta Was this translation helpful? Give feedback.
-
@RodneyBates I also tried to define the |
Beta Was this translation helpful? Give feedback.
-
@RodneyBates Adding the
PS. I have the same for g++13 and g++14. |
Beta Was this translation helpful? Give feedback.
-
cm3.cfg ! Look , please , inside
2) If GCC is bad ( feature has leaked (?) , then downgrade version
…----------------
Кому: modula3/cm3 ***@***.***);
Копия: Mention ***@***.***);
Тема: [modula3/cm3] Problems with m3gdb on FreeBSD 14.2/AMD64. (Discussion #1202);
12.04.2025, 14:52, "Dariusz Knociński" ***@***.***>:
@RodneyBates I also tried to define the m3_backend procedure but this also had no effect, this procedure is not called during compilation.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
D.K. , are You have Debian or Ubuntu Linux inside VM?
Best on x64 CPU
…----------------
{{ ( Hidden by VVM)
Najlepsze tłumaczenie na polski zależy od kontekstu, ale oto kilka opcji: Formalne: D.K., czy w maszynie wirtualnej posiadasz system Debian lub Ubuntu Linux? Najlepiej na procesorze x64. Nieformalne: D.K., masz w VM Debiana albo Ubuntu? Najlepiej na x64. Techniczne: D.K., system w maszynie wirtualnej: Debian lub Ubuntu? Zalecany procesor x64.Opcja "formalne" jest najbardziej poprawna gramatycznie, "nieformalne" jest prostsze i bardziej naturalne w rozmowie, a "techniczne" skupia się na aspekcie technicznym. Wybierz opcję najbardziej pasującą do sytuacji.
}}
----------------
Кому: modula3/cm3 ***@***.***);
Копия: Mention ***@***.***);
Тема: [modula3/cm3] Problems with m3gdb on FreeBSD 14.2/AMD64. (Discussion #1202);
12.04.2025, 14:54, "Dariusz Knociński" ***@***.***>:
@RodneyBates Adding the -gstabs+ option is not a good idea in the long run either:
g++15: warning: switch '-gstabs+' is no longer supported
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Are you using PM3 or one of its relatives? The m3makefile commands changed with
CM3.
…On 4/12/25 04:30, Dariusz Knociński wrote:
@RodneyBates <https://github.com/RodneyBates> I found inaccuracies in the m3gdb documentation:
|By default, PM3 et. al. produce debug information. If your installation is not giving debug information, add the line option("debuginfo","T") to your m3makefile. To suppress generation of debug information, add the line option("debuginfo","") to your m3makefile. |
When you add the phrase |option("debuginfo","T")| cm3/quake rebels:
|$ cm3 -build -verbose EVAL ("/home/dknoto/cm3/bin/cm3.cfg") mkdir AMD64_FREEBSD --- building in AMD64_FREEBSD --- cd AMD64_FREEBSD EVAL ("m3make.args") rm .M3SHIP rm .M3OVERRIDES "/home/dknoto/…/FmtTests/src/m3makefile", line 3: quake runtime error: undefined variable: option --procedure-- -line- -file--- include_dir 3 /home/dknoto/…/FmtTests/src/m3makefile 5 /home/dknoto/…/FmtTests/AMD64_FREEBSD/m3make.args Fatal Error: package build failed seconds #times operation --------------------------------------------------- 0.00 TOTAL rm m3make.args cd .. is_empty (AMD64_FREEBSD) => .M3SHIP |
—
Reply to this email directly, view it on GitHub <#1202 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSVZNBXRKHTQZ65NQL3CXL2ZDMKJAVCNFSM6AAAAABZ6Z2WX2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEOBRGEZTAOA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I have idea: we need example near to ideal.
I proposal : OS Debian 12 ( or 8 , or Ubuntu)
Latest source code from "my branch"
"M3CC backend"
Victor M.:Перевести:Знаменитому писателю Чехову, предписывают следующую сентенцию:-- В человеке всё должно быть прекрасно. И пуговицы на костюме.AI:The following aphorism is attributed to the famous writer Chekhov:-- In a person, everything should be beautiful. Even the buttons on his coat.
…----------------
Кому: modula3/cm3 ***@***.***);
Копия: Mention ***@***.***);
Тема: [modula3/cm3] Problems with m3gdb on FreeBSD 14.2/AMD64. (Discussion #1202);
12.04.2025, 20:41, "Rodney M. Bates" ***@***.***>:
Are you using PM3 or one of its relatives? The m3makefile commands changed with
CM3.
On 4/12/25 04:30, Dariusz Knociński wrote:
@RodneyBates <https://github.com/RodneyBates> I found inaccuracies in the m3gdb documentation:
|By default, PM3 et. al. produce debug information. If your installation is not giving debug information, add the line option("debuginfo","T") to your m3makefile. To suppress generation of debug information, add the line option("debuginfo","") to your m3makefile. |
When you add the phrase |option("debuginfo","T")| cm3/quake rebels:
|$ cm3 -build -verbose EVAL ("/home/dknoto/cm3/bin/cm3.cfg") mkdir AMD64_FREEBSD --- building in AMD64_FREEBSD --- cd AMD64_FREEBSD EVAL ("m3make.args") rm .M3SHIP rm .M3OVERRIDES "/home/dknoto/…/FmtTests/src/m3makefile", line 3: quake runtime error: undefined variable: option --procedure-- -line- -file--- include_dir 3 /home/dknoto/…/FmtTests/src/m3makefile 5 /home/dknoto/…/FmtTests/AMD64_FREEBSD/m3make.args Fatal Error: package build failed seconds #times operation --------------------------------------------------- 0.00 TOTAL rm m3make.args cd .. is_empty (AMD64_FREEBSD) => .M3SHIP |
—
|
Beta Was this translation helpful? Give feedback.
-
D.K.} =
D.K.}My main system is Fedora/FreeBSD on PPC64LE. AMD64/FreeBSD is the entertainment system under my TV ;-)
D.K.}=
Debug on PPP64LE potecialy possible by "LLVM backend"
But Fedora AMD64 ( x64) is an interesting option.
Are You have it? ( Not necessarily on bare metal; Inside QEMU is good variant, too)
…----------------
Кому: modula3/cm3 ***@***.***);
Копия: Mention ***@***.***);
Тема: [modula3/cm3] Problems with m3gdb on FreeBSD 14.2/AMD64. (Discussion #1202);
12.04.2025, 22:14, "Dariusz Knociński" ***@***.***>:
I last tested Debian around 1995...
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
On 4/12/25 14:12, Dariusz Knociński wrote:
So what is the point of keeping the documentation for the PM3 distribution in the CM3 distribution?
There is only one doc file for all the versions, since the majority of content is identical. Most
or all activity today is with CM3. Would you prefer 2 copies, on in PM3 and one in CM3 distributions?
I was confused by the “and others”.
From the introduction:
m3gdb supports code compiled by the SRC, PM3, EZM3, and CM3 Modula-3 compilers. A single m3gdb executable dynamically detects and adapts to code compiled by any of these compilers. The SRC, PM3, and EZM3 compilers differ very little, as far as m3gdb is concerned, so the phrase "PM3 et. al." will be used in statements that
^^^^^^^^^^^
apply equally to any of these three Modula-3 compilers. More information on the various compilers and other language implementation alternatives and be found in this section.
OK, that's a paraphrase.
@RodneyBates <https://github.com/RodneyBates> Adding the |-gstabs+| option is not a good idea in the long run either:
|g++15: warning: switch '-gstabs+' is no longer supported |
OK, I clearly need to be more explicit.
If you want m3gdb, you need to use the m3cc back end. It uses a code generator that
is taken from a much earlier fork of GCC that has needed very little or no change since.
It accepts the -gstabs+ switch and, in combination with the CM3/PM3 et al. front end,
produces the debug info m3gdb needs. This warning must have come from the compiler
component of a recent, unforked stock GCC, which is not used by the m3cc back end
at all. M3cc uses a current GCC only for its assembler and linker components, and
those don't recognize -g*. So you must have used a different back end.
The only back end that uses the compiler component of an installed GCC is the C
back end. This produces C source code and then runs your installed GCC's compiler
to generate code, along with GCC's assembler and linker. If you do this, there is no
point in using m3gdb. The C source language does not have counterparts to the
Modula-3 constructs that m3gdb handles. So m3gdb used on code produced this way
will not do anything materially better that a stock gdb.
The integrated back end, in its time produced, some of the stabs stuff that m3gdb
looks for, but I am not sure how complete it is.
The LLVM back end would be the ideal, but LLVM produces only dwarf versions.
It would require a lot of work on both the compiler and debugger, that nobody
has time for right now.
You can have a halfway decent Modula-3 debugging experience now by and only by
using the m3cc back end, with -gstabs+ and m3gdb.
… —
Reply to this email directly, view it on GitHub <#1202 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSVZNAT6LBFR5TAE3DU3FD2ZFQSNAVCNFSM6AAAAABZ6Z2WX2VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEOBRGUZDENI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I've found 35f3901 @jaykrell , have all target tested? AMD64_FREEBSD too ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I recently tried to use m3gdb on FreeBSD 14.2/AMD64 and ran into three major obstacles:
a) When trying to compile m3gdb, the clang 18.1.6 compiler is selected by default. Unfortunately, compilation with this compiler fails:
b) Changing the compiler to GCC 14.2.1 20250315 causes errors already at the configuration stage of the build process:
c) After changing to gcc13 13.3.0, compilation proceeds correctly and m3gcc builds:
But unfortunately it doesn't work very well:
The system's GDB in the same scenario works fine, but the readability of the process from the Modula-3 point of view is abysmal:
M3gdb is severely outdated compared to current gdb, version 6.4 vs. 15.1. Perhaps m3gdb sources should be updated?
Personally I don't know the inner structure of gdb but as a "slave" I can help ;-)
Beta Was this translation helpful? Give feedback.
All reactions