[vm] Avoid linker warnings for run_vm_tests.

```
ld64.lld: warning: cannot export hidden symbol Dart_ActivationFrameInfo
>>> defined in obj/runtime/vm/run_vm_tests.debugger_api_impl_test.o
```

Namespace the former API functions retained for testing so they don't match the export glob Dart_*.

TEST=build
Change-Id: I4b7ed4125ef25cc33b6d4073399b0824019a1e01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324568
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
Ryan Macnak
2023-09-06 21:46:00 +00:00
committed by Commit Queue
parent 14378ed39f
commit bb464cab79
2 changed files with 41 additions and 48 deletions
+20 -24
View File
@@ -59,8 +59,7 @@ namespace dart {
return Api::NewError("%s requires debugger support.", CURRENT_FUNC); \
}
DART_EXPORT Dart_Handle Dart_StackTraceLength(Dart_StackTrace trace,
intptr_t* length) {
Dart_Handle Dart_StackTraceLength(Dart_StackTrace trace, intptr_t* length) {
DARTSCOPE(Thread::Current());
CHECK_NOT_NULL(length);
CHECK_AND_CAST(DebuggerStackTrace, stack_trace, trace);
@@ -68,9 +67,9 @@ DART_EXPORT Dart_Handle Dart_StackTraceLength(Dart_StackTrace trace,
return Api::Success();
}
DART_EXPORT Dart_Handle Dart_GetActivationFrame(Dart_StackTrace trace,
int frame_index,
Dart_ActivationFrame* frame) {
Dart_Handle Dart_GetActivationFrame(Dart_StackTrace trace,
int frame_index,
Dart_ActivationFrame* frame) {
DARTSCOPE(Thread::Current());
CHECK_NOT_NULL(frame);
CHECK_AND_CAST(DebuggerStackTrace, stack_trace, trace);
@@ -83,7 +82,7 @@ DART_EXPORT Dart_Handle Dart_GetActivationFrame(Dart_StackTrace trace,
return Api::Success();
}
DART_EXPORT Dart_Handle Dart_GetStackTrace(Dart_StackTrace* trace) {
Dart_Handle Dart_GetStackTrace(Dart_StackTrace* trace) {
DARTSCOPE(Thread::Current());
Isolate* I = T->isolate();
CHECK_DEBUGGER(I);
@@ -92,8 +91,8 @@ DART_EXPORT Dart_Handle Dart_GetStackTrace(Dart_StackTrace* trace) {
return Api::Success();
}
DART_EXPORT Dart_Handle Dart_GetStackTraceFromError(Dart_Handle handle,
Dart_StackTrace* trace) {
Dart_Handle Dart_GetStackTraceFromError(Dart_Handle handle,
Dart_StackTrace* trace) {
DARTSCOPE(Thread::Current());
CHECK_DEBUGGER(T->isolate());
CHECK_NOT_NULL(trace);
@@ -116,12 +115,11 @@ DART_EXPORT Dart_Handle Dart_GetStackTraceFromError(Dart_Handle handle,
}
}
DART_EXPORT Dart_Handle
Dart_ActivationFrameInfo(Dart_ActivationFrame activation_frame,
Dart_Handle* function_name,
Dart_Handle* script_url,
intptr_t* line_number,
intptr_t* column_number) {
Dart_Handle Dart_ActivationFrameInfo(Dart_ActivationFrame activation_frame,
Dart_Handle* function_name,
Dart_Handle* script_url,
intptr_t* line_number,
intptr_t* column_number) {
DARTSCOPE(Thread::Current());
CHECK_AND_CAST(ActivationFrame, frame, activation_frame);
if (function_name != nullptr) {
@@ -139,8 +137,8 @@ Dart_ActivationFrameInfo(Dart_ActivationFrame activation_frame,
return Api::Success();
}
DART_EXPORT Dart_Handle Dart_SetBreakpoint(Dart_Handle script_url_in,
intptr_t line_number) {
Dart_Handle Dart_SetBreakpoint(Dart_Handle script_url_in,
intptr_t line_number) {
Breakpoint* bpt;
{
DARTSCOPE(Thread::Current());
@@ -159,8 +157,8 @@ DART_EXPORT Dart_Handle Dart_SetBreakpoint(Dart_Handle script_url_in,
return Dart_NewInteger(bpt->id());
}
DART_EXPORT Dart_Handle Dart_EvaluateStaticExpr(Dart_Handle lib_handle,
Dart_Handle expr_in) {
Dart_Handle Dart_EvaluateStaticExpr(Dart_Handle lib_handle,
Dart_Handle expr_in) {
DARTSCOPE(Thread::Current());
CHECK_DEBUGGER(T->isolate());
@@ -211,8 +209,7 @@ DART_EXPORT Dart_Handle Dart_EvaluateStaticExpr(Dart_Handle lib_handle,
}
}
DART_EXPORT Dart_Handle Dart_LibraryId(Dart_Handle library,
intptr_t* library_id) {
Dart_Handle Dart_LibraryId(Dart_Handle library, intptr_t* library_id) {
DARTSCOPE(Thread::Current());
const Library& lib = Api::UnwrapLibraryHandle(Z, library);
if (lib.IsNull()) {
@@ -225,8 +222,8 @@ DART_EXPORT Dart_Handle Dart_LibraryId(Dart_Handle library,
return Api::Success();
}
DART_EXPORT Dart_Handle Dart_GetLibraryDebuggable(intptr_t library_id,
bool* is_debuggable) {
Dart_Handle Dart_GetLibraryDebuggable(intptr_t library_id,
bool* is_debuggable) {
DARTSCOPE(Thread::Current());
CHECK_NOT_NULL(is_debuggable);
const Library& lib = Library::Handle(Library::GetLibrary(library_id));
@@ -238,8 +235,7 @@ DART_EXPORT Dart_Handle Dart_GetLibraryDebuggable(intptr_t library_id,
return Api::Success();
}
DART_EXPORT Dart_Handle Dart_SetLibraryDebuggable(intptr_t library_id,
bool is_debuggable) {
Dart_Handle Dart_SetLibraryDebuggable(intptr_t library_id, bool is_debuggable) {
DARTSCOPE(Thread::Current());
const Library& lib = Library::Handle(Z, Library::GetLibrary(library_id));
if (lib.IsNull()) {
+21 -24
View File
@@ -8,6 +8,8 @@
#include "include/dart_api.h"
#include "vm/debugger.h"
namespace dart {
typedef struct _Dart_Breakpoint* Dart_Breakpoint;
typedef struct _Dart_StackTrace* Dart_StackTrace;
@@ -69,8 +71,7 @@ typedef void Dart_BreakpointResolvedHandler(Dart_IsolateId isolate_id,
*
* \return A handle to the True object if no error occurs.
*/
DART_EXPORT Dart_Handle Dart_GetLibraryDebuggable(intptr_t library_id,
bool* is_debuggable);
Dart_Handle Dart_GetLibraryDebuggable(intptr_t library_id, bool* is_debuggable);
/**
* Requests that debugging be enabled for the given library.
@@ -79,8 +80,7 @@ DART_EXPORT Dart_Handle Dart_GetLibraryDebuggable(intptr_t library_id,
*
* \return A handle to the True object if no error occurs.
*/
DART_EXPORT Dart_Handle Dart_SetLibraryDebuggable(intptr_t library_id,
bool is_debuggable);
Dart_Handle Dart_SetLibraryDebuggable(intptr_t library_id, bool is_debuggable);
/**
* Sets a breakpoint at line \line_number in \script_url, or the closest
@@ -91,8 +91,7 @@ DART_EXPORT Dart_Handle Dart_SetLibraryDebuggable(intptr_t library_id,
* \return A handle containing the breakpoint id, which is an integer
* value, or an error object if a breakpoint could not be set.
*/
DART_EXPORT Dart_Handle Dart_SetBreakpoint(Dart_Handle script_url,
intptr_t line_number);
Dart_Handle Dart_SetBreakpoint(Dart_Handle script_url, intptr_t line_number);
/**
* Returns in \trace the current stack trace, or nullptr if the
@@ -102,7 +101,7 @@ DART_EXPORT Dart_Handle Dart_SetBreakpoint(Dart_Handle script_url,
*
* \return A valid handle if no error occurs during the operation.
*/
DART_EXPORT Dart_Handle Dart_GetStackTrace(Dart_StackTrace* trace);
Dart_Handle Dart_GetStackTrace(Dart_StackTrace* trace);
/**
* Returns in \trace the stack trace associated with the error given in \handle.
@@ -111,8 +110,8 @@ DART_EXPORT Dart_Handle Dart_GetStackTrace(Dart_StackTrace* trace);
*
* \return A valid handle if no error occurs during the operation.
*/
DART_EXPORT Dart_Handle Dart_GetStackTraceFromError(Dart_Handle error,
Dart_StackTrace* trace);
Dart_Handle Dart_GetStackTraceFromError(Dart_Handle error,
Dart_StackTrace* trace);
/**
* Returns in \length the number of activation frames in the given
@@ -122,8 +121,7 @@ DART_EXPORT Dart_Handle Dart_GetStackTraceFromError(Dart_Handle error,
*
* \return A handle to the True object if no error occurs.
*/
DART_EXPORT Dart_Handle Dart_StackTraceLength(Dart_StackTrace trace,
intptr_t* length);
Dart_Handle Dart_StackTraceLength(Dart_StackTrace trace, intptr_t* length);
/**
* Returns in \frame the activation frame with index \frame_index.
@@ -133,9 +131,9 @@ DART_EXPORT Dart_Handle Dart_StackTraceLength(Dart_StackTrace trace,
*
* \return A handle to the True object if no error occurs.
*/
DART_EXPORT Dart_Handle Dart_GetActivationFrame(Dart_StackTrace trace,
int frame_index,
Dart_ActivationFrame* frame);
Dart_Handle Dart_GetActivationFrame(Dart_StackTrace trace,
int frame_index,
Dart_ActivationFrame* frame);
/**
* Returns information about the given activation frame.
@@ -153,12 +151,11 @@ DART_EXPORT Dart_Handle Dart_GetActivationFrame(Dart_StackTrace trace,
*
* \return A valid handle if no error occurs during the operation.
*/
DART_EXPORT Dart_Handle
Dart_ActivationFrameInfo(Dart_ActivationFrame activation_frame,
Dart_Handle* function_name,
Dart_Handle* script_url,
intptr_t* line_number,
intptr_t* column_number);
Dart_Handle Dart_ActivationFrameInfo(Dart_ActivationFrame activation_frame,
Dart_Handle* function_name,
Dart_Handle* script_url,
intptr_t* line_number,
intptr_t* column_number);
/**
* Execute the expression given in string \expr in the context
@@ -170,15 +167,15 @@ Dart_ActivationFrameInfo(Dart_ActivationFrame activation_frame,
* the compilation of the expression fails, or if the evaluation throws
* an error.
*/
DART_EXPORT Dart_Handle Dart_EvaluateStaticExpr(Dart_Handle lib_handle,
Dart_Handle expr);
Dart_Handle Dart_EvaluateStaticExpr(Dart_Handle lib_handle, Dart_Handle expr);
/**
* Returns in \library_id the library id of the given \library.
*
* \return A valid handle if no error occurs during the operation.
*/
DART_EXPORT Dart_Handle Dart_LibraryId(Dart_Handle library,
intptr_t* library_id);
Dart_Handle Dart_LibraryId(Dart_Handle library, intptr_t* library_id);
} // namespace dart
#endif // RUNTIME_VM_DEBUGGER_API_IMPL_TEST_H_