GDB Packs Missing? [duplicate] - debugging

This question already has answers here:
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.47.el6_2.9.i686 libgcc-4.4.6-3.el6.i686 libstdc++-4.4.6-3.el6.i686
(3 answers)
Closed 8 years ago.
I run GDB on a program and get this after setting breakpoint main:
Missing separate debuginfos, use: debuginfo-install glibc-2.17-55.el7.x86_64
What exactly does it want?

It means that you should install a debuginfo package of the program you debugged. The package's name is always like this:
{package-name}-debuginfo.x86_64.
It is the package which includes the source code of the program you used, so when you debug the program it can locate many information like source file, line number and so on.

Related

The meaning of ./... in make file is not clear [duplicate]

This question already has answers here:
What do three dots "./..." mean in Go command line invocations?
(2 answers)
What does the following argument in a terminal command mean: ./ [duplicate]
(1 answer)
Closed 6 months ago.
what is the meaning of ./... in make file.
Below are few example where it is used in the make file
https://github.com/cosmos/gaia/blob/main/Makefile#L102
https://github.com/strangelove-ventures/packet-forward-middleware/blob/main/Makefile#L111
... (ellipsis) is a wildcard used by go to represent all subdirectories (recursively).
You can see it documented in go help packages.
It is seen commonly in go get ./... to get the current directory's (.) packages and all its subdirectories (...) packages.

How to run a program with one command? [duplicate]

This question already has answers here:
How to compile Go program consisting of multiple files?
(7 answers)
How to compile a program in Go
(1 answer)
Go: How does go run file.go work
(4 answers)
Closed 9 months ago.
I have an app. There are many .go files, but also there are files with tests.
Of course, the command go run *.go don't work correct.
And now I should write every time something like that: go run fileName.go fileName.go fileName.go and so forth.
Is it possible to run programs with a shorter command ?
Thank You

why bash shell does not make any difference after executed? [duplicate]

This question already has answers here:
Global environment variables in a shell script
(7 answers)
Closed 5 years ago.
I'm working a small project which needs using OpenMPI to make "mpicc" work.
I made a file make_cmd:
#!/bin/bash
module load OpenMPI
However, after executing ./make_cmd, I was told:
mpicc: command not found
But if I just type on the command line: module load OpenMPI, then mpicc is working.
Why is that? Thanks!
See this answer on neighbouring site.
Because module is an alias/shell function and not a binary program, it's not necessarily available in the non-interactive sub-shell that is created when you run your script. You could probably run source make_cmd though, as that will just run the commands in your current interactive shell. You could ditch the #!/bin/bash line in that case.

Use terminal command in ruby code? [duplicate]

This question already has answers here:
How to call shell commands from Ruby
(22 answers)
Closed 8 years ago.
Is there any way to use command line commands in ruby code ?
Like : Some third party .ipa installer command inside ruby code(reinstall the app between scenarios using a 3rd party installer like ideviceinstaller).
Kernel#exec, that replaces your ruby process with the one you specified, as a corresponding syscall. Therefore, it ends the program even if there's more code to run. Probably not what you want. Works like: exec("this")
Backticks. `this` will run this and return its stdout as a string. The same thing with different syntax: %x(this)
Kernel#system: mostly same as exec, but doesn't replace your Ruby process and returns a boolean... most of the time: whether it worked successfully (true), it returned non-zero (false) or failed to run at all (nil); runnable as system("this")
See these three and links to more

Finding location of command executed [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Can a Bash script tell what directory it's stored in?
Is there a command-line function (bash) to find the location of the command you've executed?
I understand I could check my $PATH for things I've imported manually but there must be some way to do this. A tricky echo command or something?
Besides whereis, see also which and type.

Resources