All Questions
2,658 questions
-1
votes
0
answers
100
views
RESOLVED Why is my custom GetModuleHandle function returning a truncated pointer on x64? [closed]
I'm trying to implement a custom version of GetModuleHandle that takes a hash of the module name and returns the base address of the loaded module.
Here is the code:
PVOID GetModuleHandleH(DWORD ...
1
vote
0
answers
30
views
Debugging Basilisk.fr programs in vscode
I'm working on fluid dynamics simulations using Basilisk, which is a C-based framework for solving PDEs on adaptive meshes. I'm not a C/C++ developer by background, so I'm trying to understand whether ...
5
votes
1
answer
100
views
How does GDB actually know what symbols to load in and at what address?
I have been writing a dynamic program loader in C. More specifically, I am writing a chain loader which runs some code before loading in the normal dynamic loader (ld.so). This allows me to run some ...
2
votes
0
answers
75
views
Tracing Dynamic C Library Function Calls in Linux
I am currently trying to perform a detailed analysis of a dynamic C library's "mimalloc" behavior when loaded by a specific program in a Linux environment. Specifically, I want to ...
1
vote
0
answers
78
views
Debugging a C program in VSCode with GCC and GDB fails due to space in path
I have a C source code file called main.c located in the directory:
C:\Users\arnau.blanco\OneDrive - Company\Desktop\code
I am trying to debug this file using VSCode on Windows. I have GCC, GDB, and ...
0
votes
0
answers
77
views
All collected data shows <unavailable> in GDB trace
In a GDB session, I am using trace to define trace points to collect some variables. The following is my C code:
#include <stdio.h>
int main() {
// Define variables for square, cube, and ...
1
vote
2
answers
51
views
SAMR21 skipping parts of code while debugging
My code should read the ADC 3 times, then take the average, if it is less than half of the fullscale value, the the onboard LED should turn off, if it is higher than half of the fullscale value it ...
1
vote
2
answers
91
views
How to get debuginfod for GDB MSYS2?
I have been trying to run GDP to debug a Tcl C extension using the command gdb tclsh - but the MSYS2 version of GDB says that Support for debuginfod is not compiled into GDB. and outputs Reading ...
1
vote
1
answer
71
views
Why do i get different results when I print out characters in the buffer when using a for loop and a printf function?
I have been practicing C and so I thought making a file encryption and decryption program would be good practice.However as I was working on the problem of displaying the encrypted form of the files ...
2
votes
0
answers
61
views
How can I debug with lldb on windows using the regular clang compiler driver?
This works:
clang-cl -MTd -Z7 -fuse-ld=lld main.c -o main.exe
lldb main.exe
And lldb finds the debug symbols.
But I want to use clang and not clang-cl as its command line syntax is the same on all ...
1
vote
0
answers
54
views
Breakpoints not beeing hit when debugging python CFFI with attached Visual Studio Debugger
Description
I have a c project for an embedded device.
I want to call parts of this code from CFFI for testing and developement purposes.
Compiling and running the CFFI on its own works great.
I get ...
0
votes
1
answer
68
views
Logging from winapi callbacks
I am developing a C application in Visual Studio 2022, using winapi. I have some issues regarding logging (for debug purposes) from callbacks when using winapi thread pools. Below is a minimal example ...
3
votes
2
answers
160
views
C output changed by adding a printf
int32_t result = registers[rs] + registers[rt];
if (((registers[rs] > 0) && (registers[rt] > 0) && (result < 0)) ||
((registers[rs] < 0) && (registers[rt] &...
0
votes
1
answer
73
views
Calculator GUI Prints Only "2" Regardless of Calculation – C Backend and Python (Tkinter) Frontend [closed]
Hello everyone,
I'm new to programming and recently built a calculator application with a backend written in C and a frontend using Python's Tkinter. When I run main.py, the GUI appears without any ...
1
vote
0
answers
65
views
To integrate arm64 hw watchpoint to linux process in C
I am looking at the Linux breakpoint test case, and try to understand it to put it into a Linux process
https://github.com/torvalds/linux/blob/master/tools/testing/selftests/breakpoints/...