Questions tagged [symbol-table]

A `symbol table` is a data structure that maps each identifier in a program's source code to information relating to its declaration or appearance in the source.

A symbol table is used by a language translator (compiler, interpreter...) for associating each identifier in a program's source code with information relating to its declaration or appearance in the source (type, scope level, sometimes location...).

A common implementation technique is to use a hash table implementation. A compiler may use one large symbol table for all symbols or use separated, hierarchical symbol tables for different scopes.

202 questions
9
votes
3 answers

gdb no symbol table loaded for core file

There was a core dump produced at the customer end for my application and while looking at the backtrace I don't have the symbols loaded... (gdb) where #0 0x000000364c032885 in ?? () #1 0x000000364c034065 in ?? () #2 0x0000000000000000 in ??…
S Raju
  • 91
  • 1
  • 1
  • 2
8
votes
1 answer

Symbol-table: deleting entries

Why do I get the values from "$n" and "$m" after deleting the respective symbol-table-entries? #!/usr/bin/env perl use warnings; use 5.012; package Foo; our $n = 10; our $m = 20; delete $Foo::{'n'}; delete $Foo::{'m'}; say $n; # 10 say $m; # 20
sid_com
  • 24,137
  • 26
  • 96
  • 187
7
votes
1 answer

How to make a symbol table

We have as an assignment to make a compiler. We have already made the lexical and syntax analysis but we are stuck at generation of intermediate code. We realized that we have to implement a symbol table in order to proceed to intermediate code…
bottled_ghost
  • 103
  • 2
  • 7
6
votes
2 answers

Get a symbol's value by its name in a sub

I'm making a package, where I have to get a symbol's value by its name in a sub, while the symbol is defined outside the sub. Here is the simplified code, it works as expected: #! /usr/bin/env perl6 sub dump_value($symbol) { say…
lovetomato
  • 903
  • 5
  • 11
6
votes
1 answer

Does a Symbol Table store AST (Declaration)Nodes or are the "Symbols" different objects/classes?

I have a few things about the AST / Symbol Table relation that i don't understand. I currently have a AST implemented in C# which has nodes for variable declarations (these contain informations about the name, type, source position, a possible…
6
votes
3 answers

Does Symbol table for C++ code contain function names along with class names?

I have been searching through various posts regarding whether symbol table for a C++ code contains functions' name along with the class name. Something which i could find on a post is that it depends on the type of compiler, if it compiles code in…
6
votes
1 answer

Debugging with GDB Cannot Lookup D Program symbols

I have successfully built and installed Ian Buclaw's (ibuclaw) GDB branch on github on my Ubuntu 13.10 x86_64 with its default compiler GCC 4.8.1. I had to remove the file ld from the bin sub-directory otherwise DMD complains about a sysroot thing…
Nordlöw
  • 11,838
  • 10
  • 52
  • 99
6
votes
5 answers

Is it possible to determine if a symbol is a variable or function in C?

I am implementing some limited remote debugging functionality for an application written in C running on a Linux box. The goal is to communicate with the application and lookup the value of an arbitrary variable or run an arbitrary function. I am…
dykeag
  • 554
  • 3
  • 11
6
votes
2 answers

What does (.eh) mean in nm output?

When I look at the symbols in my library, nm mylib.a, I see some duplicate entries that look like this: 000000000002d130 S __ZN7quadmat11SpAddLeavesC1EPNS_14BlockContainerEPy 00000000000628a8 S…
Adam
  • 16,808
  • 7
  • 52
  • 98
6
votes
4 answers

What is the internal identification of a Java method?

As we know, in Java, method name is not sufficient to distinguish different methods. I think (may be wrong), to distinguish a method, it needs the following info: (className, methodName, methodParameters) Further, how to identify a method more…
JackWM
  • 10,085
  • 22
  • 65
  • 92
5
votes
1 answer

How to rename perl __ANON__ sub without disabling strict 'refs'?

I found a solution to renaming anonymous subs in Perl here. It involves temporarily mangling the symbol table to insert the desired name. This solution uses a hard-coded symbol table name to be replaced. My problem is that I would like to…
5
votes
1 answer

A Symbol Table in C

I am currently developing a kind of static analysis tool that performs pattern matching. I am using Flex to generate lexical analyzer, and I wrote code to manage the symbol table. I am not very experienced with C, so I decided to implement the…
Melvin Smiley
  • 109
  • 2
  • 2
  • 8
5
votes
2 answers

Eclipse complains "No symbol table is loaded" while elf file contains debug info

I am working on an STM32 processor. Using readelf -w, tons of debug information could be extracted from my elf file. A short piece of the output is shown below: <1><3faf>: Abbrev Number: 30 (DW_TAG_variable) <3fb0> DW_AT_name :…
Chris Xia
  • 51
  • 2
4
votes
1 answer

GDB Objective-c debugging (no symbol table)

I have an executable and I am debugging it using gdb. This is my first time using gdb so bear with me please. I want to set a breakpoint at a function and I know the name of the function using class dump. Now it won't let me add breakpoint to that…
user635064
  • 6,219
  • 12
  • 54
  • 100
4
votes
0 answers

Symbol Resolution and Dynamic Linking

I have been reading about the relocation and symbol resolution process and I have a few questions on the same. So the whole process(of loading the exec) starts with exec(BA_OS) command. During exec(BA_OS), the system retrieves a path name from the…
ray an
  • 1,132
  • 3
  • 17
  • 42
1
2
3
13 14