BDE 4.39.x 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
202namespace balst {
203
204 // =====================
205 // class StackTraceFrame
206 // =====================
207
208/// This simply constrained (value-semantic) attribute class describes a
209/// call frame created on the execution stack when a *parent* function calls
210/// a *child* function. Supplementary predicate methods indicate whether a
211/// given attribute value is considered "unknown". See the @ref balst_stacktraceframe-attributes section for infromation on the class attributes.
212///
213/// \note Note that the class
214/// invariants are identically the constraints on the individual attributes.
215///
216/// See @ref balst_stacktraceframe
218
219 private:
220 // DATA
221 const void *d_address; // return address in the parent
222 // on completion of the child
223 // function, if known, and 0
224 // otherwise
225
226 bsl::string d_libraryFileName; // name of the executable file or
227 // shared library, where the code
228 // referred to by 'd_address'
229 // resides, if known, and ""
230 // otherwise
231
232 int d_lineNumber; // line number in the source file
233 // corresponding to 'd_address',
234 // if known, and -1 otherwise
235
236 bsl::string d_mangledSymbolName; // mangled name of the parent
237 // function, if known, and ""
238 // otherwise
239
240 bsl::size_t d_offsetFromSymbol; // offset (in bytes) of 'd_address'
241 // from the start of the parent
242 // function, if known, and
243 // '(bsl::size_t)-1' otherwise.
244
245 bsl::string d_sourceFileName; // name of the source file of the
246 // parent function, if known, and ""
247 // otherwise
248
249 bsl::string d_symbolName; // name of the parent function, if
250 // known, and "" otherwise
251
252 public:
253 // TRAITS
255
256 // CREATORS
257
258 /// Create a `StackTraceFrame` object having the (default)
259 /// attribute values:
260 /// @code
261 /// address == 0
262 /// libraryFileName == ""
263 /// lineNumber == -1
264 /// mangledSymbolName == ""
265 /// offsetFromSymbol == (size_t)-1
266 /// sourceFileName == ""
267 /// symbolName == ""
268 /// @endcode
269 /// Optionally specify a `basicAllocator` used to supply memory. If
270 /// `basicAllocator` is 0, the currently installed default allocator is
271 /// used.
272 explicit
273 StackTraceFrame(bslma::Allocator *basicAllocator = 0);
274
275 /// Create a local time descriptor object having the specified
276 /// `address`, `libraryFileName`, `lineNumber`, `mangledSymbolName`,
277 /// `offsetFromSymbol`, `sourceFileName`, and `symbolName` attribute
278 /// values. Optionally specify a `basicAllocator` used to supply
279 /// memory. If `basicAllocator` is 0, the currently installed default allocator is used.
280 ///
281 /// \pre The behavior is undefined unless
282 /// `-1 <= lineNumber`.
283 StackTraceFrame(const void *address,
285 int lineNumber,
287 bsl::size_t offsetFromSymbol,
290 bslma::Allocator *basicAllocator = 0);
291
292 /// Create a `StackTraceFrame` object having the same value as the
293 /// specified `original` object. Optionally specify a `basicAllocator`
294 /// used to supply memory. If `basicAllocator` is 0, the currently
295 /// installed default allocator is used.
296 StackTraceFrame(const StackTraceFrame& original,
297 bslma::Allocator *basicAllocator = 0);
298
299 /// Destroy this object.
301
302 // MANIPULATORS
303
304 /// Assign to this object the value of the specified `rhs` object, and
305 /// return a reference providing modifiable access to this object.
307
308 /// Set the `address` attribute of this object to the specified `value`.
309 ///
310 /// \note Note that the value `(void *)0)` indicates that `address` is
311 /// "unknown".
312 void setAddress(const void *value);
313
314 /// Set the `libraryFileName` attribute of this object to the specified `value`.
315 ///
316 /// \note Note that the empty string indicates the `libraryFileName`
317 /// is "unknown".
318 void setLibraryFileName(const bsl::string_view& value);
319
320 /// Set the `lineNumber` attribute of this object to the specified `value`.
321 ///
322 /// \pre The behavior is undefined unless `-1 <= value`.
323 ///
324 /// \note Note that the value -1 indicates the `lineNumber` is "unknown".
325 void setLineNumber(int value);
326
327 /// Set the `mangledSymbolName` attribute of this object to the specified `value`.
328 ///
329 /// \note Note that the empty string indicates that the
330 /// `mangledSymbolName` is "unknown".
331 void setMangledSymbolName(const bsl::string_view& value);
332
333 /// Set the `offsetFromSymbol` attribute of this object to the specified `value`.
334 ///
335 /// \note Note that the value `(bsl::size_t)-1` indicates that
336 /// `offsetFromSymbol` is "unknown".
337 void setOffsetFromSymbol(bsl::size_t value);
338
339 /// Set the `sourceFileName` attribute of this object to the specified `value`.
340 ///
341 /// \note Note that the empty string indicates that `sourceFileName`
342 /// is "unknown".
343 void setSourceFileName(const bsl::string_view& value);
344
345 /// Set the `symbolName` attribute of this object to the specified `value`.
346 ///
347 /// \note Note that the empty string indicates that `symbolName` is
348 /// "unknown".
349 void setSymbolName(const bsl::string_view& value);
350
351 // Aspects
352
353 /// Efficiently exchange the value of this object with the value of the
354 /// specified `other` object. This method provides the no-throw exception-safety guarantee.
355 ///
356 /// \pre The behavior is undefined unless this
357 /// object was created with the same allocator as `other`.
358 void swap(StackTraceFrame& other);
359
360 // ACCESSORS
361
362 /// Return the value of `address` attribute of this object.
363 ///
364 /// \note Note that `(void *)0` indicates that the `address` is "unknown".
365 const void *address() const;
366
367 /// Return a reference providing non-modifiable access to the
368 /// `libraryFileName` attribute of this object. Note the empty string
369 /// indicates that the `libraryFileName` is "unknown".
370 const bsl::string& libraryFileName() const;
371
372 /// Return the value of the `lineNumber` attribute of this object.
373 ///
374 /// \note Note that -1 indicates that `lineNumber` is "unknown".
375 int lineNumber() const;
376
377 /// Return a reference providing non-modifiable access to the `mangledSymbolName` attribute of this object.
378 ///
379 /// \note Note that the empty
380 /// string indicates that `mangledSymbolName` is "unknown".
381 const bsl::string& mangledSymbolName() const;
382
383 /// Return the value of the `offsetFromSymbol` attribute of this object.
384 ///
385 /// \note Note that `(bsl::size_t)-1` indicates that `lineNumber` is not
386 /// known.
387 bsl::size_t offsetFromSymbol() const;
388
389 /// Return a reference providing non-modifiable access to the `sourceFileName` attribute of this object.
390 ///
391 /// \note Note that the empty
392 /// string indicates that `sourceFileName` is "unknown".
393 const bsl::string& sourceFileName() const;
394
395 /// Return a reference providing non-modifiable access to the `symbolName` attribute of this object.
396 ///
397 /// \note Note that the empty string
398 /// indicates that `symbolName` is "unknown".
399 const bsl::string& symbolName() const;
400
401 // Predicates
402
403 /// Return `true` if the `setAddress` attribute of this object is not
404 /// the "unknown" value for that attribute, and `false` otherwise.
405 bool isAddressKnown() const;
406
407 /// Return `true` if the `libraryFileName` attribute of this object is
408 /// not the "unknown" value for that attribute, and `false` otherwise.
409 bool isLibraryFileNameKnown() const;
410
411 /// Return `true` if the `lineNumber` attribute of this object is not
412 /// the "unknown" value for that attribute, and `false` otherwise.
413 bool isLineNumberKnown() const;
414
415 /// Return `true` if the `mangledSymbolName` attribute of this object is
416 /// not the "unknown" value for that attribute, and `false` otherwise.
417 bool isMangledSymbolNameKnown() const;
418
419 /// Return `true` if the `offsetFromSymbol` attribute of this object is
420 /// not the "unknown" value for that attribute, and `false` otherwise.
421 bool isOffsetFromSymbolKnown() const;
422
423 /// Return `true` if the `sourceFileName` attribute of this object is
424 /// not the "unknown" value for that attribute, and `false` otherwise.
425 bool isSourceFileNameKnown() const;
426
427 /// Return `true` if the `symbolName` attribute of this object is not
428 /// the "unknown" value for that attribute, and `false` otherwise.
429 bool isSymbolNameKnown() const;
430
431 // Aspects
432
433 /// Return the allocator used by this object to supply memory.
434 ///
435 /// \note Note that if no allocator was supplied at construction the currently
436 /// installed default allocator is used.
438
439 /// Write the value of this object to the specified output `stream` in a
440 /// human-readable format, and return a reference to `stream`.
441 /// Optionally specify an initial indentation `level`, whose absolute
442 /// value is incremented recursively for nested objects. If `level` is
443 /// specified, optionally specify `spacesPerLevel`, whose absolute value
444 /// indicates the number of spaces per indentation level for this and
445 /// all of its nested objects. If `level` is negative, suppress
446 /// indentation of the first line. If `spacesPerLevel` is negative,
447 /// format the entire output on one line, suppressing all but the
448 /// initial indentation (as governed by `level`). If `stream` is not valid on entry, this operation has no effect.
449 ///
450 /// \note Note that the format
451 /// is not fully specified, and can change without notice.
452 bsl::ostream& print(bsl::ostream& stream,
453 int level = 0,
454 int spacesPerLevel = 4) const;
455};
456
457// FREE OPERATORS
458
459/// Return `true` if the specified `lhs` and `rhs` objects have the same
460/// value, and `false` otherwise. Two `StackTraceFrame` objects
461/// have the same value if the corresponding values of their `address`,
462/// `libraryFileName`, `lineNumber`, `mangledSymbolName`,
463/// `offsetFromSymbol`, `sourceFileName`, and `symbolName` attributes are
464/// the same.
465bool operator==(const StackTraceFrame& lhs, const StackTraceFrame& rhs);
466
467/// Return `true` if the specified `lhs` and `rhs` objects do not have the
468/// same value, and `false` otherwise. Two `StackTraceFrame`
469/// objects do not have the same value if the corresponding values
470/// of their `address`, `libraryFileName`, `lineNumber`,
471/// `mangledSymbolName`, `offsetFromSymbol`, `sourceFileName`, or
472/// `symbolName` attributes are the not same.
473bool operator!=(const StackTraceFrame& lhs, const StackTraceFrame& rhs);
474
475/// Write the value of the specified `object` to the specified output
476/// `stream` in a single-line format, and return a reference to `stream`.
477/// If `stream` is not valid on entry, this operation has no effect.
478///
479/// \note Note that this human-readable format is not fully specified and can change
480/// without notice. Also note that this method has the same behavior as
481/// `object.print(stream, 0, -1)`, but with the attribute names elided.
482bsl::ostream& operator<<(bsl::ostream& stream, const StackTraceFrame& object);
483
484// FREE FUNCTIONS
485
486/// Exchange the values of the specified `a` and `b` objects. This function
487/// provides the no-throw exception-safety guarantee if the two objects were
488/// created with the same allocator and the basic guarantee otherwise.
490
491// ============================================================================
492// INLINE FUNCTION DEFINITIONS
493// ============================================================================
494
495 // ---------------------
496 // class StackTraceFrame
497 // ---------------------
498
499// CREATORS
500inline
502: d_address(0)
503, d_libraryFileName(basicAllocator)
504, d_lineNumber(-1)
505, d_mangledSymbolName(basicAllocator)
506, d_offsetFromSymbol((bsl::size_t)-1)
507, d_sourceFileName(basicAllocator)
508, d_symbolName(basicAllocator)
509{
510}
511
512inline
514 const bsl::string_view& libraryFileName,
515 int lineNumber,
516 const bsl::string_view& mangledSymbolName,
517 bsl::size_t offsetFromSymbol,
518 const bsl::string_view& sourceFileName,
519 const bsl::string_view& symbolName,
520 bslma::Allocator *basicAllocator)
521: d_address(address)
522, d_libraryFileName(libraryFileName.begin(),
523 libraryFileName.end(),
524 basicAllocator)
525, d_lineNumber(lineNumber)
526, d_mangledSymbolName(mangledSymbolName.begin(),
527 mangledSymbolName.end(),
528 basicAllocator)
529, d_offsetFromSymbol(offsetFromSymbol)
530, d_sourceFileName(sourceFileName.begin(),
531 sourceFileName.end(),
532 basicAllocator)
533, d_symbolName(symbolName.begin(), symbolName.end(), basicAllocator)
534{
536 BSLS_ASSERT(-1 <= lineNumber);
540}
541
542inline
544 bslma::Allocator *basicAllocator)
545: d_address(original.d_address)
546, d_libraryFileName(original.d_libraryFileName, basicAllocator)
547, d_lineNumber(original.d_lineNumber)
548, d_mangledSymbolName(original.d_mangledSymbolName, basicAllocator)
549, d_offsetFromSymbol(original.d_offsetFromSymbol)
550, d_sourceFileName(original.d_sourceFileName, basicAllocator)
551, d_symbolName(original.d_symbolName, basicAllocator)
552{
553}
554
555inline
557{
558 BSLS_ASSERT(-1 <= d_lineNumber);
559}
560
561// MANIPULATORS
562inline
564{
565 if (rhs == *this) {
566 return *this; // RETURN
567 }
568
569 bslma::Allocator *allocator_p = d_symbolName.get_allocator().mechanism();
570 StackTraceFrame(rhs, allocator_p).swap(*this);
571 return *this;
572}
573
574inline
575void StackTraceFrame::setAddress(const void *value)
576{
577 d_address = value;
578}
579
580inline
582{
583 BSLS_ASSERT(0 != value.data());
584
585 d_libraryFileName.assign(value.begin(), value.end());
586}
587
588inline
590{
591 BSLS_ASSERT(-1 <= value);
592
593 d_lineNumber = value;
594}
595
596inline
598{
599 BSLS_ASSERT(0 != value.data());
600
601 d_mangledSymbolName.assign(value.begin(), value.end());
602}
603
604inline
606{
607 d_offsetFromSymbol = value;
608}
609
610inline
612{
613 BSLS_ASSERT(0 != value.data());
614
615 d_sourceFileName.assign(value.begin(), value.end());
616}
617
618inline
620{
621 BSLS_ASSERT(0 != value.data());
622
623 d_symbolName.assign(value.begin(), value.end());
624}
625
626// ACCESSORS
627inline
628const void *StackTraceFrame::address() const
629{
630 return d_address;
631}
632
633inline
635{
636 return d_libraryFileName;
637}
638
639inline
641{
642 return d_lineNumber;
643}
644
645inline
647{
648 return d_offsetFromSymbol;
649}
650
651inline
653{
654 return d_mangledSymbolName;
655}
656
657inline
659{
660 return d_sourceFileName;
661}
662
663inline
665{
666 return d_symbolName;
667}
668
669 // Predicates
670inline
672{
673 return 0 != d_address;
674}
675
676inline
678{
679 return !d_libraryFileName.empty();
680}
681
682inline
684{
685 return d_lineNumber > 0;
686}
687
688inline
690{
691 return !d_mangledSymbolName.empty();
692}
693
694inline
696{
697 return (bsl::size_t)-1 != d_offsetFromSymbol;
698}
699
700inline
702{
703 return !d_sourceFileName.empty();
704}
705
706inline
708{
709 return !d_symbolName.empty();
710}
711
712 // Aspects
713
714inline
716{
717 return d_symbolName.get_allocator().mechanism();
718}
719
720} // close package namespace
721
722// FREE OPERATORS
723inline
724bool balst::operator==(const StackTraceFrame& lhs, const StackTraceFrame& rhs)
725{
726 return lhs.address() == rhs.address()
727 && lhs.libraryFileName() == rhs.libraryFileName()
728 && lhs.lineNumber() == rhs.lineNumber()
729 && lhs.mangledSymbolName() == rhs.mangledSymbolName()
730 && lhs.offsetFromSymbol() == rhs.offsetFromSymbol()
731 && lhs.sourceFileName() == rhs.sourceFileName()
732 && lhs.symbolName() == rhs.symbolName();
733}
734
735inline
736bool balst::operator!=(const StackTraceFrame& lhs, const StackTraceFrame& rhs)
737{
738 return lhs.address() != rhs.address()
739 || lhs.libraryFileName() != rhs.libraryFileName()
740 || lhs.lineNumber() != rhs.lineNumber()
741 || lhs.mangledSymbolName() != rhs.mangledSymbolName()
742 || lhs.offsetFromSymbol() != rhs.offsetFromSymbol()
743 || lhs.sourceFileName() != rhs.sourceFileName()
744 || lhs.symbolName() != rhs.symbolName();
745}
746
747
748
749#endif
750
751// ----------------------------------------------------------------------------
752// Copyright 2018 Bloomberg Finance L.P.
753//
754// Licensed under the Apache License, Version 2.0 (the "License");
755// you may not use this file except in compliance with the License.
756// You may obtain a copy of the License at
757//
758// http://www.apache.org/licenses/LICENSE-2.0
759//
760// Unless required by applicable law or agreed to in writing, software
761// distributed under the License is distributed on an "AS IS" BASIS,
762// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
763// See the License for the specific language governing permissions and
764// limitations under the License.
765// ----------------------------- END-OF-FILE ----------------------------------
766
767/** @} */
768/** @} */
769/** @} */
Definition balst_stacktraceframe.h:217
BSLMF_NESTED_TRAIT_DECLARATION(StackTraceFrame, bslma::UsesBslmaAllocator)
void setLineNumber(int value)
Definition balst_stacktraceframe.h:589
int lineNumber() const
Definition balst_stacktraceframe.h:640
void swap(StackTraceFrame &other)
bool isLibraryFileNameKnown() const
Definition balst_stacktraceframe.h:677
const bsl::string & mangledSymbolName() const
Definition balst_stacktraceframe.h:652
void setOffsetFromSymbol(bsl::size_t value)
Definition balst_stacktraceframe.h:605
bool isAddressKnown() const
Definition balst_stacktraceframe.h:671
bool isSourceFileNameKnown() const
Definition balst_stacktraceframe.h:701
void setAddress(const void *value)
Definition balst_stacktraceframe.h:575
const bsl::string & libraryFileName() const
Definition balst_stacktraceframe.h:634
StackTraceFrame & operator=(const StackTraceFrame &rhs)
Definition balst_stacktraceframe.h:563
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
const bsl::string & symbolName() const
Definition balst_stacktraceframe.h:664
void setSymbolName(const bsl::string_view &value)
Definition balst_stacktraceframe.h:619
void setMangledSymbolName(const bsl::string_view &value)
Definition balst_stacktraceframe.h:597
StackTraceFrame(bslma::Allocator *basicAllocator=0)
Definition balst_stacktraceframe.h:501
~StackTraceFrame()
Destroy this object.
Definition balst_stacktraceframe.h:556
const bsl::string & sourceFileName() const
Definition balst_stacktraceframe.h:658
bslma::Allocator * allocator() const
Definition balst_stacktraceframe.h:715
bool isMangledSymbolNameKnown() const
Definition balst_stacktraceframe.h:689
bsl::size_t offsetFromSymbol() const
Definition balst_stacktraceframe.h:646
bool isSymbolNameKnown() const
Definition balst_stacktraceframe.h:707
bool isLineNumberKnown() const
Definition balst_stacktraceframe.h:683
void setLibraryFileName(const bsl::string_view &value)
Definition balst_stacktraceframe.h:581
bool isOffsetFromSymbolKnown() const
Definition balst_stacktraceframe.h:695
void setSourceFileName(const bsl::string_view &value)
Definition balst_stacktraceframe.h:611
const void * address() const
Definition balst_stacktraceframe.h:628
Definition bslstl_stringview.h:471
BSLS_KEYWORD_CONSTEXPR const_iterator end() const BSLS_KEYWORD_NOEXCEPT
Return the past-the-end iterator for this view.
Definition bslstl_stringview.h:1848
BSLS_KEYWORD_CONSTEXPR const_pointer data() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_stringview.h:1988
BSLS_KEYWORD_CONSTEXPR const_iterator begin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_stringview.h:1830
Definition bslstl_string.h:1252
basic_string & assign(const basic_string &replacement)
Definition bslstl_string.h:6347
allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Return the allocator used by this string to supply memory.
Definition bslstl_string.h:7423
bool empty() const BSLS_KEYWORD_NOEXCEPT
Return true if this string has length 0, and false otherwise.
Definition bslstl_string.h:7331
CHAR_TYPE * data() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_string.h:7177
Definition bslma_allocator.h:545
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition balst_objectfileformat.h:152
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 bdlat_valuetypefunctions.h:939
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917
Definition bslma_usesbslmaallocator.h:344