Displaying 8 results from an estimated 8 matches for "debugonlyoptloc".
2009 Jan 21
0
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
On Jan 21, 2009, at 4:15 AM, Andrew Haley wrote:
>> That should work fine, just use "jit" instead of "x86-emitter" as the
>> debug type.
>
> That's impossible: CurrentDebugType is now private; it appears
> nowhere in the installed headers. I can't find any public interface
> to allow a JIT to set it.
Ah ok. I'd suggest doing what llvm-gcc
2009 Jan 21
3
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
Chris Lattner wrote:
> On Jan 20, 2009, at 2:10 AM, Andrew Haley wrote:
>
>> Chris Lattner wrote:
>>> On Jan 19, 2009, at 7:55 AM, Andrew Haley wrote:
>>>
>>>> This is x86_64. I have a problem where an absolute memory load
>>>> The current LLVM trunk does not have this bug. This seems quite a
>>>> nasty
>>>> bug; is
2009 Dec 21
2
[LLVMdev] [PATCH] Implement dbgs()
...quot;),
+ cl::Hidden,
+ cl::init(0));
+
static std::string CurrentDebugType;
static struct DebugOnlyOpt {
void operator=(const std::string &Val) const {
@@ -50,6 +63,18 @@
cl::Hidden, cl::value_desc("debug string"),
cl::location(DebugOnlyOptLoc), cl::ValueRequired);
+// Signal handlers - dump debug output on termination.
+static void debug_user_sig_handler(void *Cookie)
+{
+ // This is a bit sneaky. Since this is under #ifndef NDEBUG, we
+ // know that debug mode is enabled and dbgs() really is a
+ // circular_raw_ostream. If NDEBU...
2009 Dec 19
0
[LLVMdev] [PATCH] Implement dbgs()
On Dec 18, 2009, at 6:36 PM, David Greene wrote:
>>> +// Signal handlers - dump debug output on termination.
>>> +static void debug_user_sig_handler(void *Cookie)
>>> +{
>>> + llvm::circular_raw_ostream *logout =
>>> + dynamic_cast<llvm::circular_raw_ostream *>(&llvm::dbgs());
>>
>> Please do not use dynamic_cast, we're
2009 Dec 21
0
[LLVMdev] [PATCH] Implement dbgs()
On 2009-12-21 18:06, David Greene wrote:
> On Saturday 19 December 2009 00:16, Chris Lattner wrote:
>
>
>>> Or I think I can just assume (Yikes!) that if the signal handler is
>>> invoked it will really be a circular_raw_ostream since the handler
>>> should (!) only be set up in debug mode.
>>>
>>> That scares me a bit, though.
>>>
2009 Dec 21
2
[LLVMdev] [PATCH] Implement dbgs()
...quot;),
+ cl::Hidden,
+ cl::init(0));
+
static std::string CurrentDebugType;
static struct DebugOnlyOpt {
void operator=(const std::string &Val) const {
@@ -50,6 +63,18 @@
cl::Hidden, cl::value_desc("debug string"),
cl::location(DebugOnlyOptLoc), cl::ValueRequired);
+// Signal handlers - dump debug output on termination.
+static void debug_user_sig_handler(void *Cookie)
+{
+ // This is a bit sneaky. Since this is under #ifndef NDEBUG, we
+ // know that debug mode is enabled and dbgs() really is a
+ // circular_raw_ostream. If NDEBU...
2009 Dec 19
3
[LLVMdev] [PATCH] Implement dbgs()
On Friday 18 December 2009 19:56, Chris Lattner wrote:
> > +// -debug-buffer-size - This is a command line op0tion to set the
> > size
> > +// of the debug stream circular buffer. The value is the number of
> > +// characters to save.
> > +static cl::opt<unsigned>
> > +DebugBufferSize("debug-buffer-size",
> > +
2009 Dec 18
2
[LLVMdev] [PATCH] Implement dbgs()
...--immediate print-out]"),
+ llvm::cl::init(0));
+
static std::string CurrentDebugType;
static struct DebugOnlyOpt {
void operator=(const std::string &Val) const {
@@ -50,6 +62,16 @@
cl::Hidden, cl::value_desc("debug string"),
cl::location(DebugOnlyOptLoc), cl::ValueRequired);
+// Signal handlers - dump debug output on termination.
+static void debug_user_sig_handler(void *Cookie)
+{
+ llvm::circular_raw_ostream *logout =
+ dynamic_cast<llvm::circular_raw_ostream *>(&llvm::dbgs());
+ if (logout) {
+ logout->dumpLog();
+ }
+}...