@@ -6,7 +6,6 @@ BSLS_IDENT("$Id$ $CSID$")
6
6
7
7
#include < bsls_bsltestutil.h>
8
8
#include < bsls_platform.h>
9
- #include < bsls_stackaddressutil_plinktimestamp.h>
10
9
#include < bsls_types.h>
11
10
#include < assert.h>
12
11
#include < stdio.h>
@@ -267,78 +266,6 @@ uintptr_t getStackOffset()
267
266
} // close unnamed namespace
268
267
269
268
270
- namespace {
271
-
272
- const char *getPwhatVar (const char *const tag)
273
- // Return the 'pwhat' variable with the specified 'tag'. The behavior is
274
- // undefined unless 'tag' is a non-empty null-terminated string. Return
275
- // '0' if the 'plink_timestamp___' global variable does not contain the
276
- // 'tag' or is not well formed.
277
- {
278
- // This is a modified version of 'sysutil_pwhat_getvar', adjusted to not
279
- // use additional static data and to be more resilient if
280
- // 'plink_timestamp___' is not formed as expected.
281
-
282
- assert (0 != tag);
283
-
284
- size_t taglength = strlen (tag);
285
- assert (taglength > 0 );
286
-
287
- // Assume that 'plink_timestamp___' is a '0'-terminated list of
288
- // '0'-terminated strings. Each string should roughly match the regular
289
- // expression '[^]]*] (?<tag>[A-Z]+) *: (?<value>.*)'.
290
-
291
- for (int i = 0 ; 0 != plink_timestamp___[i]; ++i) {
292
-
293
- // search through '[^]]*]'
294
- const char *p = strchr (plink_timestamp___[i], ' ]' );
295
- if (0 == p) {
296
- continue ;
297
- }
298
- ++p;
299
-
300
- // make sure the next character is ' '
301
- if (' ' != *p) {
302
- continue ;
303
- }
304
- ++p;
305
-
306
- // see if the desired 'tag' is next
307
- if (0 != strncmp (p,tag,taglength)) {
308
- continue ;
309
- }
310
- p += taglength;
311
-
312
- // identify if ' *:' is next and advance past the ':'
313
- switch (*p) {
314
- case ' ' : {
315
- p = strchr (p,' :' );
316
- } break ;
317
- case ' :' : {
318
- } break ;
319
- default : {
320
- // this is an invalid line or a tag that has the requested tag as a
321
- // prefix.
322
- continue ;
323
- } break ;
324
- }
325
- ++p;
326
-
327
- // make sure the next character is ' ' (again)
328
- if (' ' != *p) {
329
- continue ;
330
- }
331
- ++p;
332
-
333
- // the remaining part of this string is the value for the requested
334
- // 'tag'
335
- return p; // RETURN
336
- }
337
-
338
- return 0 ;
339
- }
340
-
341
- } // close unnamed namespace
342
269
343
270
namespace BloombergLP {
344
271
@@ -678,16 +605,6 @@ void StackAddressUtil::formatCheapStack(char *output,
678
605
return ; // RETURN
679
606
}
680
607
681
- const char *guid = getPwhatVar (" GUID" );
682
- if (0 != guid && 0 != *guid) {
683
- printed = snprintf (out, rem, " -g %s " , guid);
684
- out += printed;
685
- rem -= printed;
686
- if (printed < 0 || rem <= 0 ) {
687
- return ; // RETURN
688
- }
689
- }
690
-
691
608
#if defined(BSLS_PLATFORM_OS_AIX)
692
609
// On AIX cheapstack expects the stack addresses to be offset based on
693
610
// where the text segment was actually loaded - see DRQS 19990260, DRQS
0 commit comments