2424#include " auto_reset_event.h"
2525#include " canary_control.h"
2626#include " common.h"
27+ #include " debuggee_labels.h"
2728#include " format_queue.h"
2829#include " model.h"
2930#include " stopwatch.h"
@@ -50,7 +51,7 @@ class Worker {
5051 // callbacks, actions done from this function don't impact the start up
5152 // time of the application. If this function returns false, "Worker" will
5253 // stop and the debugger will not be functioning.
53- virtual bool OnWorkerReady () = 0;
54+ virtual bool OnWorkerReady (DebuggeeLabels* debuggee_labels ) = 0;
5455
5556 // Called periodically by the worker thread to give opportunity to the
5657 // agent to perform routine tasks. Examples: flushing logs, garbage
@@ -148,6 +149,16 @@ class Worker {
148149 // Result of last call to "RegisterDebuggee".
149150 bool is_registered_ { false };
150151
152+ // Debuggee labels gathered from the native code to be included in the set of
153+ // labels for the Debuggee in the RegisterDebuggee call.
154+ //
155+ // NOTE: Once the label are gathered before the first call to
156+ // RegisterDebuggee, we must be sure not to update it again, the same set of
157+ // labels should be used in every subsequent call since the labels are used in
158+ // the debuggee ID generation, so we don't want to cause duplicate IDs for the
159+ // same agent.
160+ DebuggeeLabels debuggee_labels_;
161+
151162 DISALLOW_COPY_AND_ASSIGN (Worker);
152163};
153164
0 commit comments