Hi.
First off, thanks for making something good!
Second, I couldn't find another place for bug reports, so here it goes:
The deubgger appears to struggle with pass-by-value structs in C. With the test program below you can break in `test_me`, and observe that `test` is interpreted wrong, but `wat` shows correct data. The print works as intended, so it looks like the symbol lookup for the struct is off by an indirection.
This might be related to
https://remedybg.handmade.network...nspecting_forward_declared_struct but I though a simple repro might be useful nontheless.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 | #include <stdint.h>
#include <stdio.h>
#include <string.h>
typedef struct string {
uint8_t *p;
uint32_t length;
} string;
string string_from_c( const char *s )
{
return ( string ){ .p = ( uint8_t* )s, .length = ( uint32_t )strlen( s ) };
}
void test_me( string test ){
string wat = *(string*)&test;
printf( "%.*s", test.length, test.p );
}
int main( int argc, char **argv )
{
string test = string_from_c( "testing\n" );
test_me( test );
return 0;
}
|