BDE 4.14.0 Production release
Loading...
Searching...
No Matches
balst_stacktraceframe.h
Go to the documentation of this file.
1/// @file balst_stacktraceframe.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// balst_stacktraceframe.h -*-C++-*-
8#ifndef INCLUDED_BALST_STACKTRACEFRAME
9#define INCLUDED_BALST_STACKTRACEFRAME
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup balst_stacktraceframe balst_stacktraceframe
15/// @brief Provide an attribute class describing an execution stack frame.
16/// @addtogroup bal
17/// @{
18/// @addtogroup balst
19/// @{
20/// @addtogroup balst_stacktraceframe
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#balst_stacktraceframe-purpose"> Purpose</a>
25/// * <a href="#balst_stacktraceframe-classes"> Classes </a>
26/// * <a href="#balst_stacktraceframe-description"> Description </a>
27/// * <a href="#balst_stacktraceframe-attributes"> Attributes </a>
28/// * <a href="#balst_stacktraceframe-unknown-values"> Unknown Values </a>
29/// * <a href="#balst_stacktraceframe-supplementary-methods"> Supplementary Methods </a>
30/// * <a href="#balst_stacktraceframe-usage"> Usage </a>
31/// * <a href="#balst_stacktraceframe-example-1-basic-usage"> Example 1: Basic Usage </a>
32///
33/// # Purpose {#balst_stacktraceframe-purpose}
34/// Provide an attribute class describing an execution stack frame.
35///
36/// # Classes {#balst_stacktraceframe-classes}
37///
38/// - balst::StackTraceFrame: a description of one frame of an execution stack
39///
40/// @see balst_stacktrace
41///
42/// # Description {#balst_stacktraceframe-description}
43/// This component provides a single, simply-constrained
44/// (value-semantic) attribute class, `balst::StackTraceFrame`, that describes
45/// a stack frame from the execution stack of a function call. Additional
46/// methods are provided to indicate whether a given attribute is considered
47/// "unknown".
48///
49/// ## Attributes {#balst_stacktraceframe-attributes}
50///
51///
52/// @code
53/// Name Type Default Constraint
54/// ----------------- ----------- ---------- ----------
55/// address const void * 0 none
56/// libraryFileName bsl::string "" none
57/// lineNumber int -1 'lineNumber >= -1'
58/// mangledSymbolName bsl::string "" none
59/// offsetFromSymbol bsl::size_t (size_t)-1 none
60/// sourceFileName bsl::string "" none
61/// symbolName bsl::string "" none
62/// @endcode
63/// * address: the return address in the *parent* (calling) function
64/// on return from the *child* (called) function.
65/// * libraryFileName: the executable or shared-library file name
66/// containing the parent function.
67/// * lineNumber: the source line number in the parent function corresponding,
68/// corresponding to a call to the child function.
69/// * mangledSymbolName: mangled symbol name of the parent function (in C code,
70/// the "mangled" name matches the symbol name.)
71/// * offsetFromSymbol: offset from the start of the parent function to the
72/// call to the child function.
73/// * sourceFileName: Name of the source file of the parent function.
74/// * symbolName: unmangled symbol name of the parent function (in C, code
75/// symbol name matches the mangled symbol name.)
76///
77/// ## Unknown Values {#balst_stacktraceframe-unknown-values}
78///
79///
80/// For each attribute, a particular value is reserved to designate that the
81/// attribute value is "unknown". Default constructed objects are created with
82/// the designated "unknown" value for each attribute.
83///
84/// ## Supplementary Methods {#balst_stacktraceframe-supplementary-methods}
85///
86///
87/// In addition to the usual setters and getters, the `balst::StackTraceFrame`
88/// attribute class provides also provides a suite of non-`static`,
89/// (boolean-valued) *predicate* methods, of the form `is<attributeName>Known`.
90/// Each of these return `true` if the object attribute named by the method does
91/// *not* contain the designated "unknown" value for that attribute, and `false`
92/// otherwise.
93///
94/// ## Usage {#balst_stacktraceframe-usage}
95///
96///
97/// This section illustrates intended use of this component.
98///
99/// ### Example 1: Basic Usage {#balst_stacktraceframe-example-1-basic-usage}
100///
101///
102/// In this example, we create two `balst::StackTraceFrame` objects, modify
103/// their properties, and compare them.
104///
105/// First, we create the objects `a` and `b`:
106/// @code
107/// balst::StackTraceFrame a, b;
108/// assert(a == b);
109/// @endcode
110/// Then, we verify all values are initialized by the constructor to "unknown"
111/// values:
112/// @code
113/// assert(false == a.isAddressKnown());
114/// assert(false == a.isLibraryFileNameKnown());
115/// assert(false == a.isLineNumberKnown());
116/// assert(false == a.isMangledSymbolNameKnown());
117/// assert(false == a.isOffsetFromSymbolKnown());
118/// assert(false == a.isSourceFileNameKnown());
119/// assert(false == a.isSymbolNameKnown());
120/// @endcode
121/// Next, we assign a value to the `lineNumber` attribute of `a` and verify:
122/// @code
123/// a.setLineNumber(5);
124/// assert(true == a.isLineNumberKnown());
125/// assert(5 == a.lineNumber());
126/// assert(a != b);
127/// @endcode
128/// Next, make the same change to `b` and thereby restore it's equality to `a`:
129/// @code
130/// b.setLineNumber(5);
131/// assert(true == b.isLineNumberKnown());
132/// assert(5 == b.lineNumber());
133/// assert(a == b);
134/// @endcode
135/// Next, we update the `address` attribute of `a` and use the `address`
136/// accessor method to obtain the new value for the update of `b`:
137/// @code
138/// a.setAddress((char *) 0x12345678);
139/// assert(a != b);
140///
141/// b.setAddress(a.address());
142/// assert(true == a.isAddressKnown());
143/// assert(true == b.isAddressKnown());
144/// assert((char *) 0x12345678 == a.address());
145/// assert((char *) 0x12345678 == b.address());
146/// assert(a.address() == b.address());
147/// assert(a == b);
148/// @endcode
149/// Finally, we exercise this sequence of operations for two other attributes,
150/// `symbolName` and `sourceFileName`:
151/// @code
152/// a.setSymbolName("woof");
153/// assert(a != b);
154///
155/// b.setSymbolName(a.symbolName());
156/// assert(true == a.isSymbolNameKnown());
157/// assert(true == b.isSymbolNameKnown());
158/// assert(0 == bsl::strcmp("woof", a.symbolName().c_str()));
159/// assert(0 == bsl::strcmp("woof", b.symbolName().c_str()));
160/// assert(a == b);
161///
162/// a.setSourceFileName("woof.cpp");
163/// assert(a != b);
164/// b.setSourceFileName(a.sourceFileName());
165/// assert(a.isSourceFileNameKnown());
166/// assert(b.isSourceFileNameKnown());
167/// assert(0 == bsl::strcmp("woof.cpp", a.sourceFileName().c_str()));
168/// assert(0 == bsl::strcmp("woof.cpp", b.sourceFileName().c_str()));
169/// assert(a == b);
170/// @endcode
171/// @}
172/** @} */
173/** @} */
174
175/** @addtogroup bal
176 * @{
177 */
178/** @addtogroup balst
179 * @{
180 */
181/** @addtogroup balst_stacktraceframe
182 * @{
183 */
184
185#include <balscm_version.h>
186
187#include <bslalg_swaputil.h>
188
189#include <bslma_allocator.h>
191
193
194#include <bsls_assert.h>
195#include <bsls_review.h>
196
197#include <bsl_cstddef.h> // bsl::size_t
198#include <bsl_iosfwd.h>
199#include <bsl_string.h>
200
201#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
202#include <bslalg_typetraits.h>
203
204#include <bsl_algorithm.h>
205#endif // BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
206
207
208namespace balst {
209
210 // =====================
211 // class StackTraceFrame
212 // =====================
213
214/// This simply constrained (value-semantic) attribute class describes a
215/// call frame created on the execution stack when a *parent* function calls
216/// a *child* function. Supplementary predicate methods indicate whether a
217/// given attribute value is considered "unknown". See the @ref balst_stacktraceframe-attributes
218/// section for infromation on the class attributes. Note that the class
219/// invariants are identically the constraints on the individual attributes.
220///
221/// See @ref balst_stacktraceframe
223
224 private:
225 // DATA
226 const void *d_address; // return address in the parent
227 // on completion of the child
228 // function, if known, and 0
229 // otherwise
230
231 bsl::string d_libraryFileName; // name of the executable file or
232 // shared library, where the code
233 // referred to by 'd_address'
234 // resides, if known, and ""
235 // otherwise
236
237 int d_lineNumber; // line number in the source file
238 // corresponding to 'd_address',
239 // if known, and -1 otherwise
240
241 bsl::string d_mangledSymbolName; // mangled name of the parent
242 // function, if known, and ""
243 // otherwise
244
245 bsl::size_t d_offsetFromSymbol; // offset (in bytes) of 'd_address'
246 // from the start of the parent
247 // function, if known, and
248 // '(bsl::size_t)-1' otherwise.
249
250 bsl::string d_sourceFileName; // name of the source file of the
251 // parent function, if known, and ""
252 // otherwise
253
254 bsl::string d_symbolName; // name of the parent function, if
255 // known, and "" otherwise
256
257 public:
258 // TRAITS
260
261 // CREATORS
262
263 /// Create a `StackTraceFrame` object having the (default)
264 /// attribute values:
265 /// @code
266 /// address == 0
267 /// libraryFileName == ""
268 /// lineNumber == -1
269 /// mangledSymbolName == ""
270 /// offsetFromSymbol == (size_t)-1
271 /// sourceFileName == ""
272 /// symbolName == ""
273 /// @endcode
274 /// Optionally specify a `basicAllocator` used to supply memory. If
275 /// `basicAllocator` is 0, the currently installed default allocator is
276 /// used.
277 explicit
278 StackTraceFrame(bslma::Allocator *basicAllocator = 0);
279
280 /// Create a local time descriptor object having the specified
281 /// `address`, `libraryFileName`, `lineNumber`, `mangledSymbolName`,
282 /// `offsetFromSymbol`, `sourceFileName`, and `symbolName` attribute
283 /// values. Optionally specify a `basicAllocator` used to supply
284 /// memory. If `basicAllocator` is 0, the currently installed default
285 /// allocator is used. The behavior is undefined unless
286 /// `-1 <= lineNumber`.
287 StackTraceFrame(const void *address,
289 int lineNumber,
291 bsl::size_t offsetFromSymbol,
294 bslma::Allocator *basicAllocator = 0);
295
296 /// Create a `StackTraceFrame` object having the same value as the
297 /// specified `original` object. Optionally specify a `basicAllocator`
298 /// used to supply memory. If `basicAllocator` is 0, the currently
299 /// installed default allocator is used.
300 StackTraceFrame(const StackTraceFrame& original,
301 bslma::Allocator *basicAllocator = 0);
302
303 /// Destroy this object.
305
306 // MANIPULATORS
307
308 /// Assign to this object the value of the specified `rhs` object, and
309 /// return a reference providing modifiable access to this object.
311
312 /// Set the `address` attribute of this object to the specified `value`.
313 /// Note that the value `(void *)0)` indicates that `address` is
314 /// "unknown".
315 void setAddress(const void *value);
316
317 /// Set the `libraryFileName` attribute of this object to the specified
318 /// `value`. Note that the empty string indicates the `libraryFileName`
319 /// is "unknown".
320 void setLibraryFileName(const bsl::string_view& value);
321
322 /// Set the `lineNumber` attribute of this object to the specified
323 /// `value`. The behavior is undefined unless `-1 <= value`. Note that
324 /// the value -1 indicates the `lineNumber` is "unknown".
325 void setLineNumber(int value);
326
327 /// Set the `mangledSymbolName` attribute of this object to the
328 /// specified `value`. Note that the empty string indicates that the
329 /// `mangledSymbolName` is "unknown".
330 void setMangledSymbolName(const bsl::string_view& value);
331
332 /// Set the `offsetFromSymbol` attribute of this object to the specified
333 /// `value`. Note that the value `(bsl::size_t)-1` indicates that
334 /// `offsetFromSymbol` is "unknown".
335 void setOffsetFromSymbol(bsl::size_t value);
336
337 /// Set the `sourceFileName` attribute of this object to the specified
338 /// `value`. Note that the empty string indicates that `sourceFileName`
339 /// is "unknown".
340 void setSourceFileName(const bsl::string_view& value);
341
342 /// Set the `symbolName` attribute of this object to the specified
343 /// `value`. Note that the empty string indicates that `symbolName` is
344 /// "unknown".
345 void setSymbolName(const bsl::string_view& value);
346
347 // Aspects
348
349 /// Efficiently exchange the value of this object with the value of the
350 /// specified `other` object. This method provides the no-throw
351 /// exception-safety guarantee. The behavior is undefined unless this
352 /// object was created with the same allocator as `other`.
353 void swap(StackTraceFrame& other);
354
355 // ACCESSORS
356
357 /// Return the value of `address` attribute of this object. Note that
358 /// `(void *)0` indicates that the `address` is "unknown".
359 const void *address() const;
360
361 /// Return a reference providing non-modifiable access to the
362 /// `libraryFileName` attribute of this object. Note the empty string
363 /// indicates that the `libraryFileName` is "unknown".
364 const bsl::string& libraryFileName() const;
365
366 /// Return the value of the `lineNumber` attribute of this object. Note
367 /// that -1 indicates that `lineNumber` is "unknown".
368 int lineNumber() const;
369
370 /// Return a reference providing non-modifiable access to the
371 /// `mangledSymbolName` attribute of this object. Note that the empty
372 /// string indicates that `mangledSymbolName` is "unknown".
373 const bsl::string& mangledSymbolName() const;
374
375 /// Return the value of the `offsetFromSymbol` attribute of this object.
376 /// Note that `(bsl::size_t)-1` indicates that `lineNumber` is not
377 /// known.
378 bsl::size_t offsetFromSymbol() const;
379
380 /// Return a reference providing non-modifiable access to the
381 /// `sourceFileName` attribute of this object. Note that the empty
382 /// string indicates that `sourceFileName` is "unknown".
383 const bsl::string& sourceFileName() const;
384
385 /// Return a reference providing non-modifiable access to the
386 /// `symbolName` attribute of this object. Note that the empty string
387 /// indicates that `symbolName` is "unknown".
388 const bsl::string& symbolName() const;
389
390 // Predicates
391
392 /// Return `true` if the `setAddress` attribute of this object is not
393 /// the "unknown" value for that attribute, and `false` otherwise.
394 bool isAddressKnown() const;
395
396 /// Return `true` if the `libraryFileName` attribute of this object is
397 /// not the "unknown" value for that attribute, and `false` otherwise.
398 bool isLibraryFileNameKnown() const;
399
400 /// Return `true` if the `lineNumber` attribute of this object is not
401 /// the "unknown" value for that attribute, and `false` otherwise.
402 bool isLineNumberKnown() const;
403
404 /// Return `true` if the `mangledSymbolName` attribute of this object is
405 /// not the "unknown" value for that attribute, and `false` otherwise.
406 bool isMangledSymbolNameKnown() const;
407
408 /// Return `true` if the `offsetFromSymbol` attribute of this object is
409 /// not the "unknown" value for that attribute, and `false` otherwise.
410 bool isOffsetFromSymbolKnown() const;
411
412 /// Return `true` if the `sourceFileName` attribute of this object is
413 /// not the "unknown" value for that attribute, and `false` otherwise.
414 bool isSourceFileNameKnown() const;
415
416 /// Return `true` if the `symbolName` attribute of this object is not
417 /// the "unknown" value for that attribute, and `false` otherwise.
418 bool isSymbolNameKnown() const;
419
420 // Aspects
421
422 /// Return the allocator used by this object to supply memory. Note
423 /// that if no allocator was supplied at construction the currently
424 /// installed default allocator is used.
426
427 /// Write the value of this object to the specified output `stream` in a
428 /// human-readable format, and return a reference to `stream`.
429 /// Optionally specify an initial indentation `level`, whose absolute
430 /// value is incremented recursively for nested objects. If `level` is
431 /// specified, optionally specify `spacesPerLevel`, whose absolute value
432 /// indicates the number of spaces per indentation level for this and
433 /// all of its nested objects. If `level` is negative, suppress
434 /// indentation of the first line. If `spacesPerLevel` is negative,
435 /// format the entire output on one line, suppressing all but the
436 /// initial indentation (as governed by `level`). If `stream` is not
437 /// valid on entry, this operation has no effect. Note that the format
438 /// is not fully specified, and can change without notice.
439 bsl::ostream& print(bsl::ostream& stream,
440 int level = 0,
441 int spacesPerLevel = 4) const;
442};
443
444// FREE OPERATORS
445
446/// Return `true` if the specified `lhs` and `rhs` objects have the same
447/// value, and `false` otherwise. Two `StackTraceFrame` objects
448/// have the same value if the corresponding values of their `address`,
449/// `libraryFileName`, `lineNumber`, `mangledSymbolName`,
450/// `offsetFromSymbol`, `sourceFileName`, and `symbolName` attributes are
451/// the same.
452bool operator==(const StackTraceFrame& lhs, const StackTraceFrame& rhs);
453
454/// Return `true` if the specified `lhs` and `rhs` objects do not have the
455/// same value, and `false` otherwise. Two `StackTraceFrame`
456/// objects do not have the same value if the corresponding values
457/// of their `address`, `libraryFileName`, `lineNumber`,
458/// `mangledSymbolName`, `offsetFromSymbol`, `sourceFileName`, or
459/// `symbolName` attributes are the not same.
460bool operator!=(const StackTraceFrame& lhs, const StackTraceFrame& rhs);
461
462/// Write the value of the specified `object` to the specified output
463/// `stream` in a single-line format, and return a reference to `stream`.
464/// If `stream` is not valid on entry, this operation has no effect. Note
465/// that this human-readable format is not fully specified and can change
466/// without notice. Also note that this method has the same behavior as
467/// `object.print(stream, 0, -1)`, but with the attribute names elided.
468bsl::ostream& operator<<(bsl::ostream& stream, const StackTraceFrame& object);
469
470// FREE FUNCTIONS
471
472/// Exchange the values of the specified `a` and `b` objects. This function
473/// provides the no-throw exception-safety guarantee if the two objects were
474/// created with the same allocator and the basic guarantee otherwise.
476
477// ============================================================================
478// INLINE FUNCTION DEFINITIONS
479// ============================================================================
480
481 // ---------------------
482 // class StackTraceFrame
483 // ---------------------
484
485// CREATORS
486inline
488: d_address(0)
489, d_libraryFileName(basicAllocator)
490, d_lineNumber(-1)
491, d_mangledSymbolName(basicAllocator)
492, d_offsetFromSymbol((bsl::size_t)-1)
493, d_sourceFileName(basicAllocator)
494, d_symbolName(basicAllocator)
495{
496}
497
498inline
500 const bsl::string_view& libraryFileName,
501 int lineNumber,
502 const bsl::string_view& mangledSymbolName,
503 bsl::size_t offsetFromSymbol,
504 const bsl::string_view& sourceFileName,
505 const bsl::string_view& symbolName,
506 bslma::Allocator *basicAllocator)
507: d_address(address)
508, d_libraryFileName(libraryFileName.begin(),
509 libraryFileName.end(),
510 basicAllocator)
511, d_lineNumber(lineNumber)
512, d_mangledSymbolName(mangledSymbolName.begin(),
513 mangledSymbolName.end(),
514 basicAllocator)
515, d_offsetFromSymbol(offsetFromSymbol)
516, d_sourceFileName(sourceFileName.begin(),
517 sourceFileName.end(),
518 basicAllocator)
519, d_symbolName(symbolName.begin(), symbolName.end(), basicAllocator)
520{
522 BSLS_ASSERT(-1 <= lineNumber);
526}
527
528inline
530 bslma::Allocator *basicAllocator)
531: d_address(original.d_address)
532, d_libraryFileName(original.d_libraryFileName, basicAllocator)
533, d_lineNumber(original.d_lineNumber)
534, d_mangledSymbolName(original.d_mangledSymbolName, basicAllocator)
535, d_offsetFromSymbol(original.d_offsetFromSymbol)
536, d_sourceFileName(original.d_sourceFileName, basicAllocator)
537, d_symbolName(original.d_symbolName, basicAllocator)
538{
539}
540
541inline
543{
544 BSLS_ASSERT(-1 <= d_lineNumber);
545}
546
547// MANIPULATORS
548inline
550{
551 if (rhs == *this) {
552 return *this; // RETURN
553 }
554
555 bslma::Allocator *allocator_p = d_symbolName.get_allocator().mechanism();
556 StackTraceFrame(rhs, allocator_p).swap(*this);
557 return *this;
558}
559
560inline
561void StackTraceFrame::setAddress(const void *value)
562{
563 d_address = value;
564}
565
566inline
568{
569 BSLS_ASSERT(0 != value.data());
570
571 d_libraryFileName.assign(value.begin(), value.end());
572}
573
574inline
576{
577 BSLS_ASSERT(-1 <= value);
578
579 d_lineNumber = value;
580}
581
582inline
584{
585 BSLS_ASSERT(0 != value.data());
586
587 d_mangledSymbolName.assign(value.begin(), value.end());
588}
589
590inline
592{
593 d_offsetFromSymbol = value;
594}
595
596inline
598{
599 BSLS_ASSERT(0 != value.data());
600
601 d_sourceFileName.assign(value.begin(), value.end());
602}
603
604inline
606{
607 BSLS_ASSERT(0 != value.data());
608
609 d_symbolName.assign(value.begin(), value.end());
610}
611
612// ACCESSORS
613inline
614const void *StackTraceFrame::address() const
615{
616 return d_address;
617}
618
619inline
621{
622 return d_libraryFileName;
623}
624
625inline
627{
628 return d_lineNumber;
629}
630
631inline
633{
634 return d_offsetFromSymbol;
635}
636
637inline
639{
640 return d_mangledSymbolName;
641}
642
643inline
645{
646 return d_sourceFileName;
647}
648
649inline
651{
652 return d_symbolName;
653}
654
655 // Predicates
656inline
658{
659 return 0 != d_address;
660}
661
662inline
664{
665 return !d_libraryFileName.empty();
666}
667
668inline
670{
671 return d_lineNumber > 0;
672}
673
674inline
676{
677 return !d_mangledSymbolName.empty();
678}
679
680inline
682{
683 return (bsl::size_t)-1 != d_offsetFromSymbol;
684}
685
686inline
688{
689 return !d_sourceFileName.empty();
690}
691
692inline
694{
695 return !d_symbolName.empty();
696}
697
698 // Aspects
699
700inline
702{
703 return d_symbolName.get_allocator().mechanism();
704}
705
706} // close package namespace
707
708// FREE OPERATORS
709inline
710bool balst::operator==(const StackTraceFrame& lhs, const StackTraceFrame& rhs)
711{
712 return lhs.address() == rhs.address()
713 && lhs.libraryFileName() == rhs.libraryFileName()
714 && lhs.lineNumber() == rhs.lineNumber()
715 && lhs.mangledSymbolName() == rhs.mangledSymbolName()
716 && lhs.offsetFromSymbol() == rhs.offsetFromSymbol()
717 && lhs.sourceFileName() == rhs.sourceFileName()
718 && lhs.symbolName() == rhs.symbolName();
719}
720
721inline
722bool balst::operator!=(const StackTraceFrame& lhs, const StackTraceFrame& rhs)
723{
724 return lhs.address() != rhs.address()
725 || lhs.libraryFileName() != rhs.libraryFileName()
726 || lhs.lineNumber() != rhs.lineNumber()
727 || lhs.mangledSymbolName() != rhs.mangledSymbolName()
728 || lhs.offsetFromSymbol() != rhs.offsetFromSymbol()
729 || lhs.sourceFileName() != rhs.sourceFileName()
730 || lhs.symbolName() != rhs.symbolName();
731}
732
733
734
735#endif
736
737// ----------------------------------------------------------------------------
738// Copyright 2018 Bloomberg Finance L.P.
739//
740// Licensed under the Apache License, Version 2.0 (the "License");
741// you may not use this file except in compliance with the License.
742// You may obtain a copy of the License at
743//
744// http://www.apache.org/licenses/LICENSE-2.0
745//
746// Unless required by applicable law or agreed to in writing, software
747// distributed under the License is distributed on an "AS IS" BASIS,
748// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
749// See the License for the specific language governing permissions and
750// limitations under the License.
751// ----------------------------- END-OF-FILE ----------------------------------
752
753/** @} */
754/** @} */
755/** @} */
Definition balst_stacktraceframe.h:222
BSLMF_NESTED_TRAIT_DECLARATION(StackTraceFrame, bslma::UsesBslmaAllocator)
void setLineNumber(int value)
Definition balst_stacktraceframe.h:575
int lineNumber() const
Definition balst_stacktraceframe.h:626
void swap(StackTraceFrame &other)
bool isLibraryFileNameKnown() const
Definition balst_stacktraceframe.h:663
const bsl::string & mangledSymbolName() const
Definition balst_stacktraceframe.h:638
void setOffsetFromSymbol(bsl::size_t value)
Definition balst_stacktraceframe.h:591
bool isAddressKnown() const
Definition balst_stacktraceframe.h:657
bool isSourceFileNameKnown() const
Definition balst_stacktraceframe.h:687
void setAddress(const void *value)
Definition balst_stacktraceframe.h:561
const bsl::string & libraryFileName() const
Definition balst_stacktraceframe.h:620
StackTraceFrame & operator=(const StackTraceFrame &rhs)
Definition balst_stacktraceframe.h:549
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
const bsl::string & symbolName() const
Definition balst_stacktraceframe.h:650
void setSymbolName(const bsl::string_view &value)
Definition balst_stacktraceframe.h:605
void setMangledSymbolName(const bsl::string_view &value)
Definition balst_stacktraceframe.h:583
StackTraceFrame(bslma::Allocator *basicAllocator=0)
Definition balst_stacktraceframe.h:487
~StackTraceFrame()
Destroy this object.
Definition balst_stacktraceframe.h:542
const bsl::string & sourceFileName() const
Definition balst_stacktraceframe.h:644
bslma::Allocator * allocator() const
Definition balst_stacktraceframe.h:701
bool isMangledSymbolNameKnown() const
Definition balst_stacktraceframe.h:675
bsl::size_t offsetFromSymbol() const
Definition balst_stacktraceframe.h:632
bool isSymbolNameKnown() const
Definition balst_stacktraceframe.h:693
bool isLineNumberKnown() const
Definition balst_stacktraceframe.h:669
void setLibraryFileName(const bsl::string_view &value)
Definition balst_stacktraceframe.h:567
bool isOffsetFromSymbolKnown() const
Definition balst_stacktraceframe.h:681
void setSourceFileName(const bsl::string_view &value)
Definition balst_stacktraceframe.h:597
const void * address() const
Definition balst_stacktraceframe.h:614
Definition bslstl_stringview.h:441
BSLS_KEYWORD_CONSTEXPR const_iterator end() const BSLS_KEYWORD_NOEXCEPT
Return the past-the-end iterator for this view.
Definition bslstl_stringview.h:1620
BSLS_KEYWORD_CONSTEXPR const_pointer data() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_stringview.h:1760
BSLS_KEYWORD_CONSTEXPR const_iterator begin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_stringview.h:1602
Definition bslstl_string.h:1281
basic_string & assign(const basic_string &replacement)
Definition bslstl_string.h:5716
allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Return the allocator used by this string to supply memory.
Definition bslstl_string.h:6723
bool empty() const BSLS_KEYWORD_NOEXCEPT
Return true if this string has length 0, and false otherwise.
Definition bslstl_string.h:6631
CHAR_TYPE * data() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_string.h:6477
Definition bslma_allocator.h:457
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1804
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balst_objectfileformat.h:161
bsl::ostream & operator<<(bsl::ostream &stream, const StackTrace &object)
bool operator==(const StackTrace &lhs, const StackTrace &rhs)
bool operator!=(const StackTrace &lhs, const StackTrace &rhs)
Definition bdlb_printmethods.h:283
Definition bslma_usesbslmaallocator.h:343