Home > Mobile >  vscode debugging the C code file, value of the variable which I input shows a little part
vscode debugging the C code file, value of the variable which I input shows a little part

Time:09-17

This is the C code

#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";

}

when I debug the C code, I can't see the whole value of the variable,it's normals?

=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'

enter image description here

CodePudding user response:

GDB limits the number of elements of an array on output. See the documentation to "Print Settings". The default is 200, what you got.

  • Related