Sprinter: добавить отладку C-исходников и интеграцию VS Code
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
/* Общий inline выявляет коллизии CDB между единицами трансляции. */
|
||||
static inline unsigned char transform(unsigned char value)
|
||||
{
|
||||
return value ^ 0x5a;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#include "common.h"
|
||||
unsigned char helper(unsigned char value)
|
||||
{
|
||||
return transform(value);
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
static int counter;
|
||||
int left(void) { counter = 1; return counter; }
|
||||
@@ -0,0 +1,17 @@
|
||||
#include <sdbg.h>
|
||||
|
||||
volatile int total;
|
||||
|
||||
#define AUTHOR_LOG(tag, text) SDBG_LOG(tag, text)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
total = 1;
|
||||
AUTHOR_LOG(after_one,
|
||||
"total=" "{total}");
|
||||
#if 0
|
||||
SDBG_LOG(inactive, "should not exist");
|
||||
#endif
|
||||
total = 2;
|
||||
return total;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Репро карты строк и типов; global/static должны иметь разные адреса. */
|
||||
#include "common.h"
|
||||
int total;
|
||||
const char *debug_looking_text = "Fmain$text$0_0$0 Lmain.fake";
|
||||
static signed char counter;
|
||||
unsigned char helper(unsigned char value);
|
||||
int main(void)
|
||||
{
|
||||
counter = -7;
|
||||
total = helper(transform(3));
|
||||
return total + counter;
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
static int counter;
|
||||
int right(void) { counter = 2; return counter; }
|
||||
Reference in New Issue
Block a user