这是C代码
#include <stdio.h>
#include <stdint.h>
typedef uint8_t byte;
typedef uint8_t _BYTE;
int main() {
// char *b = "hello world";
// char m [] = "what's up?";
// int me [] = {1,2,3,4,5};
// int index = 1;
byte * ads = "dsfsdsdfksdklfjskdfksdfjksdfksdfjksdjfksdjfksdjfkjsdkfjksdjfksdjfksdjfksdjfkjsdkfjksdjfksdjfksdkkkkkdddkkkksdkksdfkdkkkkskskkkdkkkdsdfkkkksdfkkkkkkke43kkksdfsdkkkksdfsdkkkk23sfkksdgfkksdfkkkk23kk23kk22kk33dkkksdfkk3kdkk2k23kkkaksdfsdkkkskkskkkdkksdfkkkksdk";
printf("%s", ads);
_BYTE *v3="sdfsdf";
}
当我调试C代码的时候,我看不到变量的整个值,它是正常的吗?
=thread-group-added,id="i1"
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 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 "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"
=cmd-param-changed,param="args",value="2>CON 1>CON <CON"
[New Thread 10460.0x1b1c]
[New Thread 10460.0x4af0]
Loaded 'C:\WINDOWS\SysWOW64\kernel32.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\SysWOW64\KernelBase.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\SysWOW64\msvcrt.dll'. Symbols loaded.
Execute debugger commands using "-exec <command>", for example "-exec info registers" will list registers in use (when GDB is the debugger)
ads
0x405064 <__register_frame_info+4214884> "dsfsdsdfksdklfjskdfksdfjksdfksdfjksdjfksdjfksdjfkjsdkfjksdjfksdjfksdjfksdjfkjsdkfjksdjfksdjfksdkkkkkdddkkkksdkksdfkdkkkkskskkkdkkkdsdfkkkksdfkkkkkkke43kkksdfsdkkkksdfsdkkkk23sfkksdgfkksdfkkkk23kk23kk2"...
*ads: 100 'd'
1条答案
按热度按时间z5btuh9x1#
GDB限制了输出数组的元素数量。请参阅“打印设置”文档。默认值是200,就是你得到的。