Skip to content

Commit ea8bbf3

Browse files
committed
Made full call stack option available to DLL
1 parent 0a424cb commit ea8bbf3

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

src/asar-dll-bindings/c/asardll.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ struct patchparams {
9898
// to force generating/not generating a checksum.
9999
bool override_checksum_gen;
100100
bool generate_checksum;
101+
102+
// Set this to true for generated error and warning texts to always
103+
// contain their full call stack.
104+
bool full_call_stack;
101105
};
102106

103107
#ifdef __cplusplus

src/asar-tests/test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,12 +840,14 @@ int main(int argc, char * argv[])
840840
asar_patch_params.stdincludesfile = stdincludespath.c_str();
841841
asar_patch_params.stddefinesfile = stddefinespath.c_str();
842842

843+
asar_patch_params.full_call_stack = true;
844+
843845
const definedata libdefines[] =
844846
{
845847
{ "cmddefined", nullptr },
846848
{ "!cmddefined2", "" },
847849
{ " !cmddefined3 ", " $10,$F0,$E0 "},
848-
// RPG Hacker: 日本語������ǵ in UTF-8
850+
// RPG Hacker: 日本語������ǵ in UTF-8
849851
{ "cmdl_define_utf8", "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e\xf0\x9f\x87\xaf\xf0\x9f\x87\xb5" },
850852
};
851853

@@ -992,7 +994,7 @@ int main(int argc, char * argv[])
992994
// randomdude999: temp workaround: using $ in command line is unsafe on linux, so use dec representation instead (for !cmddefined3)
993995
snprintf(cmd, sizeof(cmd),
994996
"\"%s\" -I\"%s\" -Dcli_only=\\$1 -Dcmddefined -D!cmddefined2= --define \" !cmddefined3 = 16,240,224 \""
995-
// RPG Hacker: 日本語������ǵ in UTF-8
997+
// RPG Hacker: 日本語������ǵ in UTF-8
996998
" -Dcmdl_define_utf8=\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e\xf0\x9f\x87\xaf\xf0\x9f\x87\xb5"
997999
" \"%s\" \"%s\"",
9981000
asar_exe_path, base_path, fname, out_rom_name);

src/asar/interface-lib.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ struct patchparams_v200 : public patchparams_base
236236
// to force generating/not generating a checksum.
237237
bool override_checksum_gen;
238238
bool generate_checksum;
239+
240+
// Set this to true for generated error and warning texts to always
241+
// contain their full call stack.
242+
bool full_call_stack;
239243
};
240244

241245
/* $EXPORTSTRUCT_PP$
@@ -385,6 +389,8 @@ EXPORT bool asar_patch(const struct patchparams_base *params)
385389

386390
asar_patch_begin(paramscurrent.romdata, paramscurrent.buflen, paramscurrent.romlen);
387391

392+
simple_callstacks = !paramscurrent.full_call_stack;
393+
388394
autoarray<string> includepaths;
389395
autoarray<const char*> includepath_cstrs;
390396

src/asar/interface-lib.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ struct patchparams {
9797
// to force generating/not generating a checksum.
9898
bool override_checksum_gen;
9999
bool generate_checksum;
100+
101+
// Set this to true for generated error and warning texts to always
102+
// contain their full call stack.
103+
bool full_call_stack;
100104
};
101105

102106
#ifdef __cplusplus

0 commit comments

Comments
 (0)