Sponsored Content
Top Forums Programming Search the symbol table of a child process Post 303034403 by alphakili on Wednesday 24th of April 2019 05:56:20 PM
Old 04-24-2019
Well, essentially I wanted to expand my debugger for AmigaOS to work on other platforms. I could do just a libgdb wrapper, but I thought it would be more interesting to do it manually and figure out, how these things work on other OS'es. Which means mainly linux at the time.

Obviously I got stuck just trying to find the address of a simple symbol. I came across this: GitHub - TartanLlama/minidbg: A mini x86 linux debugger for teaching purposes But he has the same problem: There is no symbol relocation done, so he doesn't know the actual placement of the symbols in the executable.

I am going to look into if shared memory of the /proc handler can help me. If not, I am probably going to do some libgdb wrapper for my app and focus on getting that to work and other platforms.
 

10 More Discussions You Might Find Interesting

1. Programming

no symbol table

Hi@all, I try to compile c code on hpux 11.11 pa-risc 2 with gcc (32bit). I compile with the option -g, so that I get the symbol table, but it is not available. Does someone knows something on this? thx (2 Replies)
Discussion started by: Dom_Cyrus
2 Replies

2. Programming

how to view symbol table in unix

hi , How to view the contents of a "c" program symbol table information in unix. (1 Reply)
Discussion started by: saravanan_nitt
1 Replies

3. Linux

Reading ELF file Symbol table of C++ program

Folks, I have some program(Test.cpp) as follows, #include<iostream> class Abc { private: int _theVar; public : int printVar(); }; int Abc :: printVar() { _theVar=10; } main() { Abc _t; (0 Replies)
Discussion started by: vinod_chitrali
0 Replies

4. Programming

Reading ELF file Symbol table of C++ program

Folks, I have some program(Test.cpp) as follows, #include<iostream> class Abc { private: int _theVar; public : int printVar(); }; int Abc :: printVar() { _theVar=10; } main() { Abc _t; (2 Replies)
Discussion started by: vinod_chitrali
2 Replies

5. Shell Programming and Scripting

How to make the parent process to wait for the child process

Hi All, I have two ksh script. 1st script calls the 2nd script and the second script calls an 'C' program. I want 1st script to wait until the 'C' program completes. I cant able to get the process id for the 'C' program (child process) to make the 1st script to wait for the second... (7 Replies)
Discussion started by: sennidurai
7 Replies

6. Programming

Symbol table of a C program

Hi, is there any command to see symbol table info. will it show where its allocating memory for varibales golbals & locals and code.(i mean the segments). i read there is a section called read only data segment and this is where initialized data such as strings stores. i have wriiten the... (7 Replies)
Discussion started by: MrUser
7 Replies

7. Shell Programming and Scripting

[KSH/Bash] Starting a parent process from a child process?

Hey all, I need to launch a script from within 2 other scripts that can run independently of the two parent scripts... Im having a hard time doing this, if anyone knows how please let me know. More detail. ScriptA (bash), ScriptB (ksh), ScriptC (bash) ScriptA, launches ScriptB ScirptB,... (7 Replies)
Discussion started by: trey85stang
7 Replies

8. Shell Programming and Scripting

script to get child process for a process

!/bin/sh pid=$(ps -Aj | grep MSTRSvr | grep -v grep | awk '{print $1}') sid=$(ps -Aj | grep MSTRSvr | grep -v grep | awk '{print $3}') ps -s "$sid" I am not able to get the desired output it says process list error if i use watch ps -s "$sid" it considers only the first session id (5 Replies)
Discussion started by: schippada
5 Replies

9. Emergency UNIX and Linux Support

signal between parent process and child process

Hello, everyone. Here's a program: pid_t pid = fork(); if (0 == pid) // child process { execvp ...; } I send a signal (such as SIGINT) to the parent process, the child process receive the signal as well as the parent process. However I don't want to child process to receive the... (7 Replies)
Discussion started by: jackliang
7 Replies

10. Shell Programming and Scripting

forking a child process and kill its parent to show that child process has init() as its parent

Hi everyone i am very new to linux , working on bash shell. I am trying to solve the given problem 1. Create a process and then create children using fork 2. Check the Status of the application for successful running. 3. Kill all the process(threads) except parent and first child... (2 Replies)
Discussion started by: vizz_k
2 Replies
vparreloc(1M)															     vparreloc(1M)

NAME
vparreloc - relocate the load address of a vmunix file, determine if a vmunix file is relocatable, or promote the scope of symbols in a relocatable vmunix file SYNOPSIS
target-load-address source-vmunix-file target-vmunix-file] global-symbol-vmunix-file source-vmunix-file target-vmunix-file] symbol-name source-vmunix-file target-vmunix-file] source-vmunix-file DESCRIPTION
There are four forms of this command. Each form requests that one of four supported operations be performed. The four forms are distin- guished based on whether they contain a or none of these options. If the fourth form of the command is used, then the source file is checked to determine if it is relocatable. The remaining three command forms are described below. The command is allowed on Itanium(R)-based platforms for compatibility. No action is taken for this command. Options recognizes the following command-line options: Specifies that kernel relocation is requested. The source file is relocated to the load address specified in the target load address option, and the result is written to the target file. This option needs to be used when kernel relocation is required. The file specified by this option is the source file for the requested operation. The requested operation will be performed on this file, and the result will be placed into the target file. This is a required option for all four forms of this command. Specifies that global symbol promotion has been requested on a single symbol. The symbol matching the symbol name specified is promoted to global scope, and the resulting file is written to the target file. Note that only one option may be specified. All subsequent attempts to use this option will be ignored. This option is useful when a very small number of symbols need to be promoted to global scope. There is no need to create a global symbol file for this option. Specifies that global symbol promotion has been requested. All symbols in the source file which match a symbol with global scope in the global symbol file are promoted to have global scope. The result is written to the target file. The global symbol file can be created in one of two ways: it should either be a non-relocatable file, or a relocatable file which has already been run through vparreloc using the option. This option is useful when a tool expects certain symbols to be of global scope. The creation of a relocatable kernel file changes the scope of all symbols in that file to be local. Suppress the most common messages. Note that error messages regarding an invalid file will still be printed. This option is only available with the fourth form of this command. This option is useful when used in a script which examines the return value of this command, and has no need for the informa- tional messages. The result of the requested operation will be placed into the target file. The first three forms of this command utilize the target file option. If no target file option is specified, the default becomes If the fourth form specifies a target file option, it will be ignored. Note that the and options cannot be combined in a single invocation of the command. EXAMPLES
To determine if a file is relocatable: To relocate a file to be loaded at address 0x04000000, and place the resulting file into To promote all symbols that should have global scope in a file that has been linked utilizing the kernel relocation options: RETURN VALUE
The command exits with one of the following values: Successful completion. Bad options. Can not open a file. Error reading from or writing to a file, or allocating memory. Invalid kernel file. File is not relocatable. AUTHOR
was developed by the Hewlett-Packard Company. SEE ALSO
vparextract(1M). vparreloc(1M)
All times are GMT -4. The time now is 03:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy