简体   繁体   English

使用gdb进入GNU函数

[英]Stepping into a GNU function with gdb

I would like to understand the internal workings of C's memcpy function. 我想了解C的memcpy函数的内部工作原理。 Is there a way for me to step into the function using gdb? 有没有办法让我使用gdb进入函数?

Sure. 当然。 When you get to a memcpy call, use si (step instruction) to step into the assembly. 当你进行memcpy调用时,使用si (步骤指令)进入程序集。

You will only get source if you have a debug build of libc and the glibc sources handy, though. 但是,如果你有一个libc的调试版本和glibc源,你只会获得源代码。

If you want to just see the implementation, check out eg memcpy-ssse3.S or memcpy.S . 如果您只想查看实现,请查看例如memcpy-ssse3.Smemcpy.S

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM