How do I install strace debugging tool on DragonFly BSD os?
I have just starting hacking dragonfly os. I was wondering how do I install strace debugging tool on OS.
strace is not available on DragonFly BSD. However, you may use ktrace(1)/kdump(1) or truss(1) instead which are part of the tools in base.
Related
From the output of strace -o file lldb someprog, I found there is no ptrace.
Then how can lldb get features like PTRACE_ATTACH/PTRACE_SINGLESTEP and so on?
Ironically, the lldb process doesn't do any actual debugging. Instead, it always uses a proxy (lldb-server on Linux, debugserver on Darwin)(*) to do the actual debugging, and communicates with it using the gdb remote serial protocol. lldb-server does use ptrace on Linux (and somewhat on Darwin).
(*) I think there still is an in-process adaptor for Windows, but IIRC they are switching to lldb-server as well.
Because Msys2 sucks,
as mentioned above, I need to change its default server mirrors to point to Arch Linux Mingw-w64 AUR ones, and make it as the default one.
So when I issue some pacman -S mingw-w64-* it will download the package from Arch Linux Repository and not Msys2.
I need to use Msys2 only as a shell.
Msys2 Minwg-32/64 builds use Dwarf instead of SJLJ as exception model, and this is a very bad choice, because they don't catch exceptions from other DLLs that are built with other tool-chains, and the application will crash (For example Firebird 2).
Arch Linux is smart, and has chosen to use SJLJ as exception model for its Minwg-32/64 builds.
This seems very unlikely to work. pacman for MSYS2 will download Windows PE binaries for your MSYS2 environment. pacman for Arch Linux is going to download Linux ELF binaries. You won't be able to run these on your Windows device.
You may be able to get what you want if you use Windows Subsystem for Linux (WSL).
I have been wonder about why x86(windows) to arm(linux) cross compile is possible but x86(windows) to x86(linux) cross compile is impossible or difficult only can use cygwin
As below link there is some cross-compiler for windows to arm from personal pc(x86), but there is no cross-compiler x86 to x86.
http://gnutoolchains.com/beaglebone/
why window(x86) to Debian(ARM) is available without cygwin , but window to Debian(x86) is difficult or must use cygwin?
Is this issue caused by POSIX size problem? The library size of Debian in ARM is little bit smaller than x86 ones?
I confuse....
I want to anyone clear to me.
Thank you for reading.
I installed WSL and then Debian as an Windows-App
directly under my Windows10 Home Edition.
Now I can open a Linux command prompt in every directory I want.
Installed g++ with apt-get (changed to root with "sudo su").
Using Mingw64 command prompt from the Git-Bash I can even use the same shell script
to compile console apps as Linux and Windows executables!
My prof. has asked me to do assembly language programming in linux through NASM X86 64 bit.
Since,I have Mac with me the programs will need to be modified for the MacOS, may be due to the system calls and whatever other reasons.
How shall I replicate the same environment as asked by my prof.in my macos ?
Will it be good enough if I install linux in my Macbook ?
If yes, then what will be the difference between the "Linux in Windows PC" and "Linux in Mac" in terms of programs that I will write ?
If no, then how shall I deal with that ?
Will it be good enough if I install linux in my Macbook ?
Installing it in a VM might be more convenient (you don't need to reboot to go from MacOS to Linux), but installing it directly on your Macbook will also work.
If yes, then what will be the difference between the "Linux in Windows PC" and "Linux in Mac" in terms of programs that I will write ?
"Mac vs. PC" marketing terminology not withstanding, Macs run the same types of x64 CPUs as "regular PCs" and Linux doesn't care which other operating systems are also installed on your system. So if you write assembly on a Linux on an x64 Mac, you'll use the exact same x64 instructions and Linux syscalls as you would when running Linux on an x64 non-Mac.
I would like to show the user some help on specific operations in my program of the form:
Please type "apt-get install foobar" to install the foobar feature.
Is there anything to do this or do i have to leave it to the user and offer a dozend choices from Red Hat, Suse, Debian/Ubuntu, Mandriva, Slackware, Gentoo ....
cat /etc/lsb-release
root#pierr-desktop:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=intrepid
DISTRIB_DESCRIPTION="Ubuntu 8.10"
lsb_release -a might help on debian and apparented.
No, there is no generic way to find out which Linux distribution you are running on.
There is the lsb_release command, which is specified in the Linux Standard Base specification. But obviously this command is only present on LSB-compliant distributions, and many smaller or specialized distributions are not LSB-compliant. (For example, the distribution I am running on my FritzBox router is not.)
And if you are assuming an LSB-compliant distribution anyway, then why not simply package your application as an LSB package? That way it works the same on all LSB-compliant distributions.
You could give
cat /etc/issue
a try too
Given that Linux can be built starting with one system and morphed into another, you may not be able to tell precisely which it currently is. Some distribution provide the lsb tools if they are LSB compliant, so that might help.
Some distributions provide a file /etc/dist-release. For example, I have a file /etc/arch-release that is empty.
You might also execute:
uname -a
That might indicate the distribution the kernel was built for, but that might be a long shot. My Arch linux kernel has no mention of Arch, but I believe my Gentoo install indicates "Gentoo Linux".
Some tools can be indicative of the distribution, such as apt-get, rpm, emerge, but you can usually install those tools on other distributions as well.
You can do it for most well know distros(Redhat, Fedaora, Gentoo, Suse, Debian, Ubuntu), those have special files to identify the distribution and version. i.e. /etc/debian_version.
But it would be a tedious task for you to list out all the package and things but if you really want to be user friendly
try with cat:
cat /proc/version
but with uname is maybe better:
uname -a