Set radix (16) for gdb
This commit is contained in:
parent
c35b33b613
commit
01fe163cf2
4 changed files with 11 additions and 4 deletions
5
.vscode/launch.json
vendored
5
.vscode/launch.json
vendored
|
@ -25,6 +25,11 @@
|
||||||
"description": "Set Disassembly Flavor to Intel",
|
"description": "Set Disassembly Flavor to Intel",
|
||||||
"text": "-gdb-set disassembly-flavor intel",
|
"text": "-gdb-set disassembly-flavor intel",
|
||||||
"ignoreFailures": true
|
"ignoreFailures": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Set output radix",
|
||||||
|
"text": "set output-radix 16",
|
||||||
|
"ignoreFailures": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"preLaunchTask": "CMake: build"
|
"preLaunchTask": "CMake: build"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void lib1_function();
|
void lib1_function(unsigned int i);
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
#include "lib3.h" // Include lib3's header to call lib3_function
|
#include "lib3.h" // Include lib3's header to call lib3_function
|
||||||
#include <stdio.h> // Include standard I/O here, as printf is used in this source file.
|
#include <stdio.h> // Include standard I/O here, as printf is used in this source file.
|
||||||
|
|
||||||
void lib1_function() {
|
void lib1_function(unsigned int i)
|
||||||
printf("This is a function from Library 1.\n");
|
{
|
||||||
|
printf("This is a function from Library 1. %u\n", i);
|
||||||
lib2_function(); // Call function from lib2
|
lib2_function(); // Call function from lib2
|
||||||
lib3_function(); // Call function from lib3
|
lib3_function(); // Call function from lib3
|
||||||
printf("Lib1 has called functions from Lib2 and Lib3.\n");
|
printf("Lib1 has called functions from Lib2 and Lib3.\n");
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
unsigned int magic = 0xa5a5a5a5;
|
||||||
std::cout << "Hello from main application!" << std::endl;
|
std::cout << "Hello from main application!" << std::endl;
|
||||||
// Call functions from the linked libraries
|
// Call functions from the linked libraries
|
||||||
lib1_function();
|
lib1_function(magic);
|
||||||
lib2_function();
|
lib2_function();
|
||||||
lib3_function();
|
lib3_function();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue