符号表 symbol table 符号 地址 互推
阅读原文时间:2023年07月10日阅读:2

https://zh.wikipedia.org/wiki/符号表

https://en.wikipedia.org/wiki/Symbol_table

计算机科学中,符号表是一种用于语言翻译器(例如编译器解释器)中的数据结构。在符号表中,程序源代码中的每个标识符都和它的声明或使用信息绑定在一起,比如其数据类型作用域以及内存地址

散列表是用来实现符号表的一种常用技术。编译器可能会使用一个很大的符号表来包含所有的符号,或是针对不同的作用域使用层次结构的多个独立的符号表。

目标文件中通常会有一个包含了所有外部可见标识符的符号表。在链接不同的目标文件时,链接器会使用这些文件中的符号表来解析所有未解析的符号引用。

符号表可能只存在于翻译阶段,也可能被嵌入到该阶段的输出文件中,以供后续阶段使用。比如,它可用于交互式的调试器中,也可以在程序执行过程中或结束后提供格式化的诊断报告。

在逆向工程中,许多任务具会通过符号表来检查全局变量和已知函数的地址。如果可执行文件的符号表被strip这样的工具去除掉了,则逆向工程会更加困难。

在进行动态内存分配和变量访问时,编译器需要完成许多任务作,其中扩展的栈模型就需要用到符号表。

下图是一个小程序的符号表。该表是用GNU Binutils中的nm工具生成的。其中有一个数据类型符号(由类型 "D" 表明)和许多函数(自己定义的以及标准库中的)。第一列是每个符号在内存中的位置,第二列是"符号类型",而第三列则是符号名称。通过传递适当的参数,可以按照地址顺序生成该符号表。

Example table

地址

类型

名称

00000020

a

T_BIT

00000040

a

F_BIT

00000080

a

I_BIT

20000004

t

irqvec

20000008

t

fiqvec

2000000c

t

InitReset

20000018

T

_main

20000024

t

End

20000030

T

AT91F_US3_CfgPIO_useB

2000005c

t

AT91F_PIO_CfgPeriph

200000b0

T

main

20000120

T

AT91F_DBGU_Printk

20000190

t

AT91F_US_TxReady

200001c0

t

AT91F_US_PutChar

200001f8

T

AT91F_SpuriousHandler

20000214

T

AT91F_DataAbort

20000230

T

AT91F_FetchAbort

2000024c

T

AT91F_Undef

20000268

T

AT91F_UndefHandler

20000284

T

AT91F_LowLevelInit

200002e0

t

AT91F_DBGU_CfgPIO

2000030c

t

AT91F_PIO_CfgPeriph

20000360

t

AT91F_US_Configure

200003dc

t

AT91F_US_SetBaudrate

2000041c

t

AT91F_US_Baudrate

200004ec

t

AT91F_US_SetTimeguard

2000051c

t

AT91F_PDC_Open

2000059c

t

AT91F_PDC_DisableRx

200005c8

t

AT91F_PDC_DisableTx

200005f4

t

AT91F_PDC_SetNextTx

20000638

t

AT91F_PDC_SetNextRx

2000067c

t

AT91F_PDC_SetTx

200006c0

t

AT91F_PDC_SetRx

20000704

t

AT91F_PDC_EnableRx

20000730

t

AT91F_PDC_EnableTx

2000075c

t

AT91F_US_EnableTx

20000788

T

__aeabi_uidiv

20000788

T

__udivsi3

20000884

T

__aeabi_uidivmod

2000089c

T

__aeabi_idiv0

2000089c

T

__aeabi_ldiv0

2000089c

T

__div0

200009a0

D

_data

200009a0

A

_etext

200009a0

D

holaamigosh

200009a4

A

__bss_end__

200009a4

A

__bss_start

200009a4

A

__bss_start__

200009a4

A

_edata

200009a4

A

_end

In computer science, a symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier (a.k.a. symbol) in a program's source code is associated with information relating to its declaration or appearance in the source. In other words, the entries of a symbol table store the information related to the entry's corresponding symbol.

Consider the following program written in C:

// Declare an external function
extern double bar(double x);

// Define a public function
double foo(int count)
{
double sum = 0.0;

// Sum all the values bar(1) to bar(count)  
for (int i = 1; i <= count; i++)  
    sum += bar((double) i);  
return sum;  

}

A C compiler that parses this code will contain at least the following symbol table entries:

Symbol name

Type

Scope

bar

function, double

extern

x

double

function parameter

foo

function, double

global

count

int

function parameter

sum

double

block local

i

int

for-loop statement

In addition, the symbol table will also contain entries generated by the compiler for intermediate expression values (e.g., the expression that casts the i loop variable into a double, and the return value of the call to function bar()), statement labels, and so forth.

https://baike.baidu.com/item/符号表

中文名

符号表

外文名

The symbol table

用    于

语言翻译器

属    性

数据结构

符号表在编译程序工作的过程中需要不断收集、记录和使用源程序中一些语法符号的类型和特征等相关信息。这些信息一般以表格形式存储于系统中。如常数表、变量名表、数组名表、过程名表、标号表等等,统称为符号表。对于符号表组织、构造和管理方法的好坏会直接影响编译系统的运行效率。

https://codeday.me/bug/20180823/226841.html

debugging – 如何在GDB中获取内存地址的符号名称?

时间: 2018-08-23 03:00:43.0

https://sourceware.org/gdb/onlinedocs/gdb/Symbols.html

info address&nbsp;symbol

Describe where the data for symbol is stored. For a register variable, this says which register it is kept in. For a non-register local variable, this prints the stack-frame offset at which the variable is always stored.

Note the contrast with ‘print &symbol’, which does not work at all for a register variable, and for a stack local variable prints the exact address of the current instantiation of the variable.

info symbol&nbsp;addr

Print the name of a symbol which is stored at the address addr. If no symbol is stored exactly at addr, GDB prints the nearest symbol and an offset from it:

(gdb) info symbol 0x54320
_initialize_vx + 396 in section .text

This is the opposite of the info address command. You can use it to find out the name of a variable or a function given its address.

For dynamically linked executables, the name of executable or shared library containing the symbol is also printed:

(gdb) info symbol 0x400225
_start + 5 in section .text of /tmp/a.out
(gdb) info symbol 0x2aaaac2811cf
__read_nocancel + 6 in section .text of /usr/lib64/libc.so.6

[root@test-proxy-2 ~]# ps -ef | grep gun
root 16448 1 0 Nov08 ? 00:00:13 /mnt/venvs/proDev/bin/python3.7 /mnt/venvs/proDev/bin/gunicorn wsgi_prod:application --bind=0.0.0.0:8003 --workers=2 --timeout=300 -k gevent
root 16635 16448 0 Nov08 ? 00:00:17 /mnt/venvs/proDev/bin/python3.7 /mnt/venvs/proDev/bin/gunicorn wsgi_prod:application --bind=0.0.0.0:8003 --workers=2 --timeout=300 -k gevent
root 16636 16448 0 Nov08 ? 00:00:17 /mnt/venvs/proDev/bin/python3.7 /mnt/venvs/proDev/bin/gunicorn wsgi_prod:application --bind=0.0.0.0:8003 --workers=2 --timeout=300 -k gevent
root 18262 18154 0 21:04 pts/1 00:00:00 grep gun
[root@test-proxy-2 ~]# gdb --pid=16635
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-92.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Attaching to process 16635
Reading symbols from /mnt/venvs/proDev/bin/python3.7…done.
Reading symbols from /lib64/libcrypt.so.1…(no debugging symbols found)…done.
Loaded symbols for /lib64/libcrypt.so.1
Reading symbols from /lib64/libpthread.so.0…(no debugging symbols found)…done.
[New LWP 17494]
[Thread debugging using libthread_db enabled]
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/libdl.so.2…(no debugging symbols found)…done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libutil.so.1…(no debugging symbols found)…done.
Loaded symbols for /lib64/libutil.so.1
Reading symbols from /lib64/librt.so.1…(no debugging symbols found)…done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/libm.so.6…(no debugging symbols found)…done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libc.so.6…(no debugging symbols found)…done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/libfreebl3.so…(no debugging symbols found)…done.
Loaded symbols for /lib64/libfreebl3.so
Reading symbols from /lib64/ld-linux-x86-64.so.2…(no debugging symbols found)…done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_heapq.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_heapq.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_opcode.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_opcode.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/math.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/math.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_hashlib.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_hashlib.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /usr/lib64/libssl.so.1.1…(no debugging symbols found)…done.
Loaded symbols for /usr/lib64/libssl.so.1.1
Reading symbols from /usr/lib64/libcrypto.so.1.1…(no debugging symbols found)…done.
Loaded symbols for /usr/lib64/libcrypto.so.1.1
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_blake2.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_blake2.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_sha3.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_sha3.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_bisect.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_bisect.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_random.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_random.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_socket.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_socket.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/select.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/select.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_datetime.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_datetime.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_struct.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_struct.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/binascii.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/binascii.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /lib64/libz.so.1…(no debugging symbols found)…done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/fcntl.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/fcntl.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/zlib.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/zlib.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_bz2.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_bz2.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /lib64/libbz2.so.1…(no debugging symbols found)…done.
Loaded symbols for /lib64/libbz2.so.1
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/grp.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/grp.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_posixsubprocess.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_posixsubprocess.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/pyexpat.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/pyexpat.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_ssl.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_ssl.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_pickle.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_pickle.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_queue.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_queue.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/libev/corecext.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/libev/corecext.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__hub_local.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__hub_local.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/greenlet.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/greenlet.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__greenlet_primitives.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__greenlet_primitives.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__waiter.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__waiter.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__hub_primitives.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__hub_primitives.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/_greenlet.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/_greenlet.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__ident.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__ident.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/_queue.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/_queue.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__abstract_linkable.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__abstract_linkable.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/_event.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/_event.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__semaphore.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__semaphore.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__imap.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/__imap.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/_local.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/_local.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_decimal.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_decimal.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/termios.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/termios.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/_json.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/_json.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/unicodedata.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/unicodedata.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /mnt/venvs/proDev/lib/python3.7/site-packages/MySQLdb/_mysql.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/site-packages/MySQLdb/_mysql.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /usr/lib64/mysql/libmysqlclient.so.16…(no debugging symbols found)…done.
Loaded symbols for /usr/lib64/mysql/libmysqlclient.so.16
Reading symbols from /lib64/libnsl.so.1…(no debugging symbols found)…done.
Loaded symbols for /lib64/libnsl.so.1
Reading symbols from /usr/lib64/libssl.so.10…(no debugging symbols found)…done.
Loaded symbols for /usr/lib64/libssl.so.10
Reading symbols from /usr/lib64/libcrypto.so.10…(no debugging symbols found)…done.
Loaded symbols for /usr/lib64/libcrypto.so.10
Reading symbols from /lib64/libgssapi_krb5.so.2…(no debugging symbols found)…done.
Loaded symbols for /lib64/libgssapi_krb5.so.2
Reading symbols from /lib64/libkrb5.so.3…(no debugging symbols found)…done.
Loaded symbols for /lib64/libkrb5.so.3
Reading symbols from /lib64/libcom_err.so.2…(no debugging symbols found)…done.
Loaded symbols for /lib64/libcom_err.so.2
Reading symbols from /lib64/libk5crypto.so.3…(no debugging symbols found)…done.
Loaded symbols for /lib64/libk5crypto.so.3
Reading symbols from /lib64/libkrb5support.so.0…(no debugging symbols found)…done.
Loaded symbols for /lib64/libkrb5support.so.0
Reading symbols from /lib64/libkeyutils.so.1…(no debugging symbols found)…done.
Loaded symbols for /lib64/libkeyutils.so.1
Reading symbols from /lib64/libresolv.so.2…(no debugging symbols found)…done.
Loaded symbols for /lib64/libresolv.so.2
Reading symbols from /lib64/libselinux.so.1…(no debugging symbols found)…done.
Loaded symbols for /lib64/libselinux.so.1
Reading symbols from /lib64/libnss_files.so.2…(no debugging symbols found)…done.
Loaded symbols for /lib64/libnss_files.so.2
Reading symbols from /mnt/venvs/proDev/lib/python3.7/lib-dynload/array.cpython-37m-x86_64-linux-gnu.so…done.
Loaded symbols for /mnt/venvs/proDev/lib/python3.7/lib-dynload/array.cpython-37m-x86_64-linux-gnu.so
Reading symbols from /lib64/libnss_dns.so.2…(no debugging symbols found)…done.
Loaded symbols for /lib64/libnss_dns.so.2
0x00007fc2e53dd243 in epoll_wait () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.5-7.el6_0.x86_64 glibc-2.12-1.212.el6_10.3.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-65.el6.x86_64 libcom_err-1.41.12-24.el6.x86_64 libselinux-2.0.94-7.el6.x86_64 mysql-libs-5.1.73-8.el6_8.x86_64 nss-softokn-freebl-3.14.3-23.3.el6_8.x86_64 openssl-1.0.1e-58.el6_10.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) backtrace
#0 0x00007fc2e53dd243 in epoll_wait () from /lib64/libc.so.6
#1 0x00007fc2dafe3595 in epoll_poll (loop=0x7fc2db2022c0, timeout=) at /tmp/build/gevent/deps/libev/ev_epoll.c:153
#2 0x00007fc2dafed47e in ev_run (loop=0x7fc2db2022c0, flags=Unhandled dwarf expression opcode 0xf3
) at /tmp/build/gevent/deps/libev/ev.c:3683
#3 0x00007fc2dafedfaa in __pyx_pf_6gevent_5libev_8corecext_4loop_14run (__pyx_v_self=0x7fc2d957dd50, __pyx_args=Unhandled dwarf expression opcode 0xf3
) at src/gevent/libev/corecext.c:6882
#4 __pyx_pw_6gevent_5libev_8corecext_4loop_15run (__pyx_v_self=0x7fc2d957dd50, __pyx_args=Unhandled dwarf expression opcode 0xf3
) at src/gevent/libev/corecext.c:6842
#5 0x0000000000430223 in _PyMethodDef_RawFastCallKeywords (method=, self=0x7fc2d957dd50, args=0x7fc2d5b657b0, nargs=0, kwnames=)
at Objects/call.c:694
#6 0x000000000059dbae in _PyMethodDescr_FastCallKeywords (descrobj=, args=0x7fc2d5b657a8, nargs=1, kwnames=0x0) at Objects/descrobject.c:288
#7 0x00000000004da001 in call_function (f=, throwflag=) at Python/ceval.c:4593
#8 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3110
#9 0x00000000004325d4 in function_code_fastcall (co=, args=, nargs=1, globals=) at Objects/call.c:283
#10 0x00000000004309fe in _PyFunction_FastCallDict (func=0x7fc2dafa95f0, args=, nargs=, kwargs=0x0) at Objects/call.c:322
#11 0x000000000043129c in _PyObject_Call_Prepend (callable=0x7fc2dafa95f0, obj=0x7fc2d92851d0, args=0x7fc2e6541050, kwargs=0x0) at Objects/call.c:908
#12 0x0000000000431632 in PyObject_Call (callable=0x7fc2d9294d70, args=, kwargs=) at Objects/call.c:245
#13 0x00007fc2dab5a667 in g_initialstub (mark=Unhandled dwarf expression opcode 0xf3
) at greenlet.c:823
#14 0x00007fc2dab59ff6 in g_switch (target=0x7fc2d92851d0, args=0x7fc2e6541050, kwargs=Unhandled dwarf expression opcode 0xf3
) at greenlet.c:597
#15 0x00007fc2dab5af5b in PyGreenlet_Switch (g=0x7fc2d92851d0, args=0x7fc2e6541050, kwargs=0x0) at greenlet.c:1441
#16 0x00007fc2da95071f in __pyx_f_6gevent_21__greenlet_primitives__greenlet_switch (__pyx_v_self=0x7fc2d92851d0, __pyx_skip_dispatch=Unhandled dwarf expression opcode 0xf3
) at src/gevent/_greenlet_primitives.c:2679
#17 __pyx_f_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_switch (__pyx_v_self=0x7fc2d92851d0, __pyx_skip_dispatch=Unhandled dwarf expression opcode 0xf3
) at src/gevent/_greenlet_primitives.c:1958
#18 0x00007fc2da950dce in __pyx_pf_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_switch (__pyx_v_self=Unhandled dwarf expression opcode 0xf3
) at src/gevent/_greenlet_primitives.c:2008
#19 __pyx_pw_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_1switch (__pyx_v_self=Unhandled dwarf expression opcode 0xf3
) at src/gevent/_greenlet_primitives.c:1995
#20 0x00007fc2dad65b9e in __Pyx_CyFunction_CallMethod (func=0x7fc2db687650, args=Unhandled dwarf expression opcode 0xf3
) at src/gevent/_hub_local.c:4407
#21 __Pyx_CyFunction_CallAsMethod (func=0x7fc2db687650, args=Unhandled dwarf expression opcode 0xf3
) at src/gevent/_hub_local.c:4465
#22 0x00007fc2da94ebf9 in __Pyx_PyObject_Call (func=0x7fc2db687650, arg=0x7fc2d42e1150, kw=0x0) at src/gevent/_greenlet_primitives.c:4024
#23 0x00007fc2da94bba5 in __Pyx__PyObject_CallOneArg (func=0x7fc2db687650, arg=0x7fc2d92851d0) at src/gevent/_greenlet_primitives.c:4092
#24 0x00007fc2da94fe6b in __Pyx_PyObject_CallOneArg (func=Unhandled dwarf expression opcode 0xf3
) at src/gevent/_greenlet_primitives.c:4111
#25 0x00007fc2da950d64 in __pyx_f_6gevent_21__greenlet_primitives_25SwitchOutGreenletWithLoop_switch (__pyx_v_self=0x7fc2d92851d0, __pyx_skip_dispatch=Unhandled dwarf expression opcode 0xf3
)
at src/gevent/_greenlet_primitives.c:1867
#26 0x00007fc2da73f483 in __pyx_f_6gevent_8__waiter_6Waiter_get (__pyx_v_self=0x7fc2d4fe0bf0, __pyx_skip_dispatch=Unhandled dwarf expression opcode 0xf3
) at src/gevent/_waiter.c:3309
#27 0x00007fc2da529a31 in __pyx_f_6gevent_16__hub_primitives_22WaitOperationsGreenlet_wait (__pyx_v_self=Unhandled dwarf expression opcode 0xf3
) at src/gevent/_hub_primitives.c:2120
#28 0x00007fc2da52adfe in __pyx_pf_6gevent_16__hub_primitives_22WaitOperationsGreenlet_wait (__pyx_v_self=Unhandled dwarf expression opcode 0xf3
) at src/gevent/_hub_primitives.c:2351
#29 __pyx_pw_6gevent_16__hub_primitives_22WaitOperationsGreenlet_1wait (__pyx_v_self=Unhandled dwarf expression opcode 0xf3
) at src/gevent/_hub_primitives.c:2338
#30 0x00007fc2dad65a7f in __Pyx_CyFunction_CallMethod (func=0x7fc2daf7bb90, args=Unhandled dwarf expression opcode 0xf3
) at src/gevent/_hub_local.c:4424
#31 __Pyx_CyFunction_CallAsMethod (func=0x7fc2daf7bb90, args=Unhandled dwarf expression opcode 0xf3
) at src/gevent/_hub_local.c:4465
#32 0x0000000000431fb5 in _PyObject_FastCallKeywords (callable=0x7fc2daf7bb90, stack=0x245ea68, nargs=, kwnames=0x0) at Objects/call.c:199
#33 0x00000000004d8ff5 in call_function (f=, throwflag=) at Python/ceval.c:4619
#34 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3093
#35 0x00000000004d0039 in PyEval_EvalFrameEx (_co=0x7fc2daf85930, globals=, locals=, args=, argcount=1,
kwnames=0x0, kwargs=0x2237100, kwcount=0, kwstep=1, defs=0x7fc2daf9fa18, defcount=2, kwdefs=0x0, closure=0x0, name=0x7fc2defc52f0, qualname=0x7fc2defc52f0)
at Python/ceval.c:547
#36 _PyEval_EvalCodeWithName (_co=0x7fc2daf85930, globals=, locals=, args=, argcount=1, kwnames=0x0,
kwargs=0x2237100, kwcount=0, kwstep=1, defs=0x7fc2daf9fa18, defcount=2, kwdefs=0x0, closure=0x0, name=0x7fc2defc52f0, qualname=0x7fc2defc52f0) at Python/ceval.c:3930
#37 0x00000000004306d7 in _PyFunction_FastCallKeywords (func=, stack=, nargs=, kwnames=)
at Objects/call.c:433
#38 0x00000000004d97cc in call_function (f=, throwflag=) at Python/ceval.c:4616
#39 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3093
#40 0x00000000004325d4 in function_code_fastcall (co=, args=, nargs=1, globals=) at Objects/call.c:283
---Type to continue, or q to quit---q
Quit
(gdb) info symbol 0x00007fc2e53dd243
epoll_wait + 51 in section .text of /lib64/libc.so.6
(gdb) info address epoll_poll
Symbol "epoll_poll" is a function at address 0x7fc2dafe3540.
(gdb) info address epoll_wait
Symbol "epoll_wait" is at 0x7fc2e53dd210 in a file compiled without debugging.
(gdb) info symbol 0x00007fc2e53dd243
epoll_wait + 51 in section .text of /lib64/libc.so.6
(gdb) info address epoll_wait
Symbol "epoll_wait" is at 0x7fc2e53dd210 in a file compiled without debugging.
(gdb) info address epoll_poll
Symbol "epoll_poll" is a function at address 0x7fc2dafe3540.
(gdb) info symbol 0x00007fc2dafe3595
epoll_poll + 85 in section .text of /mnt/venvs/proDev/lib/python3.7/site-packages/gevent/libev/corecext.cpython-37m-x86_64-linux-gnu.so
(gdb) q
A debugging session is active.

    Inferior 1 \[process 16635\] will be detached.

Quit anyway? (y or n) y
Detaching from program: /mnt/venvs/proDev/bin/python3.7, process 16635
[root@test-proxy-2 ~]#

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器