How to find built directory string in C exec.file? [closed] - c

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
while reading docs for FreeBSD 7.3 gdb, I saw a mention of built directory info stored in binary files. How is it stored, and how could it be retrieved?

If a binary is built with debug info, then it will contain debug symbol information that contains full path names, so when you debug, your debugger can find source files and correlate source code with execution. Open the binary file in any hex editor and you will be able to see the path strings

Related

Building go linker as a stand alone tool [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I was browsing the go source and I wanted to build it as a standalone linker for osx that can generate mach-o files. Is there anyway to do this?
The linker is already a standalone tool. You can see it by running
go tool -n 6l
which will print the location of the 6l (x86 64 bit linker) executable.
The source code of 6l can be found in GOROOT/src/cmd/6l.
In that directory you can use make to build it.

Read and rename a file from a folder in C [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I want to make a program that reads the name of a (.mp3) file from a folder and then re-name it. I want to know how to do so.
Please give me an example on how to read a (.mp3) file name and save it, and also point to me things that I should know to make this program.
I'm on windows and using VS2013.
You might like to use the rename() function.
To scan a directory you can use a combination of FindFirstFile() and FindNextFile() calls.

Reading binary (MACH-O) file load commands [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
How does otool and similar tools read load commands? I could not find any open source tools to figure this out (even though otool is partially open source). How does it parse the binary file? Where does it start?
Thanks
I would expect that the otool command would open the file and parse the header of the binary according to the OSX ABI Mach-O File Format

Reading .log file using C language in Linux [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have some information in a .log file. Is there any way to read a .log file in C language and convert it to .txt file? Are there any include files or API's I can use?
Most of the time a log file is just a formatted text file, so there is no need to convert.
Just use the rename() function from stdio.h. Here a reference: http://www.cplusplus.com/reference/cstdio/rename/.

I can't find SQLite in applications/library [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I can't find SQlite in applications/library. I've implemented the code to create the database. It's a small test, basically it just adds a person's first name and last name to a table. I don't have to download it, do I? I'm using Xcode 4.6.
You have to add usr/lib/sqlite_3.0.lib to the frameworks and #import sqlite3.h in your code.
If you need an example, see this link
http://www.techotopia.com/index.php/An_Example_SQLite_based_iOS_4_iPhone_Application_(Xcode_4)
If you've already done it, what is the error message you are receiving?

Resources