Skip to content

Commit ce1e856

Browse files
committed
Merge pull request #14559 from JuliaLang/yyc/export-debug
Make sure JL_DLLEXPORT debugging helper functions are actually exported
2 parents 84a4b3f + d0c8343 commit ce1e856

File tree

6 files changed

+9
-10
lines changed

6 files changed

+9
-10
lines changed

doc/devdocs/debuggingtips.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ there are a number of additional variables (see julia.h for a complete list) tha
4343
Useful Julia functions for Inspecting those variables
4444
-----------------------------------------------------
4545

46-
- ``gdblookup($rip)`` :: For looking up the current function and line. (use ``$eip`` on i686 platforms)
46+
- ``jl_gdblookup($rip)`` :: For looking up the current function and line. (use ``$eip`` on i686 platforms)
4747
- ``jlbacktrace()`` :: For dumping the current julia backtrace stack to stderr. Only usable after ``record_backtrace()`` has been called.
4848
- ``jl_dump_llvm_value(Value*)`` :: For invoking ``Value->dump()`` in gdb, where it doesn't work natively. For example, ``f->linfo->functionObject``, ``f->linfo->specFunctionObject``, and ``to_function(f->linfo)``.
4949
- ``Type->dump()`` :: only works in lldb. Note: add something like ``;1`` to prevent lldb from printing its prompt over the output

src/julia.expmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
iswprint;
1515
jl_*;
1616
rec_backtrace;
17+
rec_backtrace_ctx;
1718
julia_*;
1819
libsupport_init;
1920
localtime_r;

src/julia_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ JL_DLLEXPORT void attach_exception_port(void);
289289
void jl_getFunctionInfo(char **name, char **filename, size_t *line,
290290
char **inlinedat_file, size_t *inlinedat_line,
291291
uintptr_t pointer, int *fromC, int skipC, int skipInline);
292-
JL_DLLEXPORT void gdblookup(ptrint_t ip);
292+
JL_DLLEXPORT void jl_gdblookup(ptrint_t ip);
293293

294294
// *to is NULL or malloc'd pointer, from is allowed to be NULL
295295
static inline char *jl_copy_str(char **to, const char *from)

src/signal-handling.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static void jl_critical_error(int sig, bt_context_t context, ptrint_t *bt_data,
5656
if (context)
5757
*bt_size = n = rec_backtrace_ctx(bt_data, JL_MAX_BT_SIZE, context);
5858
for(size_t i=0; i < n; i++)
59-
gdblookup(bt_data[i]);
59+
jl_gdblookup(bt_data[i]);
6060
gc_debug_print_status();
6161
}
6262

src/signals-win.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
#define sig_stack_size 131072 // 128k reserved for SEGV handling
55
static BOOL (*pSetThreadStackGuarantee)(PULONG);
66

7-
JL_DLLEXPORT void gdblookup(ptrint_t ip);
8-
97
// Copied from MINGW_FLOAT_H which may not be found due to a collision with the builtin gcc float.h
108
// eventually we can probably integrate this into OpenLibm.
119
#if defined(_COMPILER_MINGW_)
@@ -220,7 +218,7 @@ static LONG WINAPI _exception_handler(struct _EXCEPTION_POINTERS *ExceptionInfo,
220218
jl_safe_printf("UNKNOWN"); break;
221219
}
222220
jl_safe_printf(" at 0x%Ix -- ", (size_t)ExceptionInfo->ExceptionRecord->ExceptionAddress);
223-
gdblookup((ptrint_t)ExceptionInfo->ExceptionRecord->ExceptionAddress);
221+
jl_gdblookup((ptrint_t)ExceptionInfo->ExceptionRecord->ExceptionAddress);
224222

225223
jl_critical_error(0, ExceptionInfo->ContextRecord, jl_bt_data, &jl_bt_size);
226224
static int recursion = 0;

src/task.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ JL_DLLEXPORT jl_value_t *jl_get_backtrace(void)
756756
}
757757

758758
//for looking up functions from gdb:
759-
JL_DLLEXPORT void gdblookup(ptrint_t ip)
759+
JL_DLLEXPORT void jl_gdblookup(ptrint_t ip)
760760
{
761761
char *func_name;
762762
size_t line_num;
@@ -794,11 +794,11 @@ JL_DLLEXPORT void gdblookup(ptrint_t ip)
794794
JL_DLLEXPORT void jlbacktrace(void)
795795
{
796796
size_t n = jl_bt_size; // jl_bt_size > 40 ? 40 : jl_bt_size;
797-
for(size_t i=0; i < n; i++)
798-
gdblookup(jl_bt_data[i]);
797+
for (size_t i=0; i < n; i++)
798+
jl_gdblookup(jl_bt_data[i]);
799799
}
800800

801-
JL_DLLEXPORT void gdbbacktrace(void)
801+
JL_DLLEXPORT void jl_gdbbacktrace(void)
802802
{
803803
record_backtrace();
804804
jlbacktrace();

0 commit comments

Comments
 (0)