Jlalond wrote:
@labath Agree on all counts, I'll split this into a different PR. With what I
learned from our obj2yaml adventure I would like to do it better anyway.
https://github.com/llvm/llvm-project/pull/97470
___
lldb-commits mailing list
lldb-co
@@ -142,6 +164,15 @@ MinidumpFile::create(MemoryBufferRef Source) {
continue;
}
+// We treat exceptions differently here because the LLDB minidump
+// makes some assumptions about uniqueness, all the streams other than
labath wrote:
I'm not
https://github.com/labath commented:
If other readers can handle these kinds of minidumps, then I guess this is
fine. Like in the other patch, I think it'd be best to split out the llvm part
into its own PR.
https://github.com/llvm/llvm-project/pull/97470
__
@@ -53,6 +53,27 @@ Expected MinidumpFile::getString(size_t Offset)
const {
return Result;
}
+Expected>
+MinidumpFile::getExceptionStreams() const {
labath wrote:
This looks like a job for an (non-fallible) input iterator returning an
`Expected`. (non-fall
@@ -142,6 +164,15 @@ MinidumpFile::create(MemoryBufferRef Source) {
continue;
}
+// We treat exceptions differently here because the LLDB minidump
+// makes some assumptions about uniqueness, all the streams other than
+// exceptions are lists. But except
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/97470
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/Jlalond reopened
https://github.com/llvm/llvm-project/pull/97470
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/Jlalond closed
https://github.com/llvm/llvm-project/pull/97470
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/Jlalond updated
https://github.com/llvm/llvm-project/pull/97470
>From 8647eccd35085ab80f978fabb78b016915c5524f Mon Sep 17 00:00:00 2001
From: Jacob Lalonde
Date: Tue, 2 Jul 2024 12:41:02 -0700
Subject: [PATCH 1/8] Add support to read multiple exception streams in
minidumps
https://github.com/Jlalond updated
https://github.com/llvm/llvm-project/pull/97470
>From 8647eccd35085ab80f978fabb78b016915c5524f Mon Sep 17 00:00:00 2001
From: Jacob Lalonde
Date: Tue, 2 Jul 2024 12:41:02 -0700
Subject: [PATCH 1/7] Add support to read multiple exception streams in
minidumps
@@ -82,15 +82,24 @@ class MinidumpFile : public Binary {
return getListStream(minidump::StreamType::ThreadList);
}
- /// Returns the contents of the Exception stream. An error is returned if
the
- /// file does not contain this stream, or the stream is smaller than t
@@ -109,7 +109,7 @@ class ProcessMinidump : public PostMortemProcess {
private:
lldb::DataBufferSP m_core_data;
llvm::ArrayRef m_thread_list;
- const minidump::ExceptionStream *m_active_exception;
+ std::unordered_map m_exceptions_by_tid;
Jlalond wrote:
@@ -82,15 +82,24 @@ class MinidumpFile : public Binary {
return getListStream(minidump::StreamType::ThreadList);
}
- /// Returns the contents of the Exception stream. An error is returned if
the
- /// file does not contain this stream, or the stream is smaller than t
Jlalond wrote:
> > @jeffreytan81 I think the callout for multiple exception is a good
> > question. I made a C# testbed to see what would happen if I had multiple
> > simultaneous exceptions. [Gist
> > here](https://gist.github.com/Jlalond/467bc990f10fbb75cc9ca7db897a7beb).
> > When manually
https://github.com/Jlalond updated
https://github.com/llvm/llvm-project/pull/97470
>From dc4730dcff31c2c9212d2ce5412ecb8a9f4d83c0 Mon Sep 17 00:00:00 2001
From: Jacob Lalonde
Date: Tue, 2 Jul 2024 12:41:02 -0700
Subject: [PATCH 1/6] Add support to read multiple exception streams in
minidumps
jeffreytan81 wrote:
> @jeffreytan81 I think the callout for multiple exception is a good question.
> I made a C# testbed to see what would happen if I had multiple simultaneous
> exceptions. [Gist
> here](https://gist.github.com/Jlalond/467bc990f10fbb75cc9ca7db897a7beb). When
> manually colle
Jlalond wrote:
@jeffreytan81 I think the callout for multiple exception is a good question. I
made a C# testbed to see what would happen if I had multiple simultaneous
exceptions. [Gist
here](https://gist.github.com/Jlalond/467bc990f10fbb75cc9ca7db897a7beb). When
manually collecting a minidum
@@ -464,8 +464,8 @@ Stream::create(const Directory &StreamDesc, const
object::MinidumpFile &File) {
StreamKind Kind = getKind(StreamDesc.Type);
switch (Kind) {
case StreamKind::Exception: {
-Expected ExpectedExceptionStream =
-File.getExceptionStream();
+
@@ -53,6 +54,31 @@ Expected MinidumpFile::getString(size_t Offset)
const {
return Result;
}
+Expected>
+MinidumpFile::getExceptionStreams() const {
+ // Scan the directories for exceptions first
+ std::vector exceptionStreams;
+ for (const auto &directory : Streams) {
+
https://github.com/jeffreytan81 requested changes to this pull request.
One concern is that, whether minidump format specification supports multiple
exception streams. If this is not supported by spec, we may generate minidump
that only lldb can read/parse but can fail other consumers.
It wou
@@ -82,15 +82,24 @@ class MinidumpFile : public Binary {
return getListStream(minidump::StreamType::ThreadList);
}
- /// Returns the contents of the Exception stream. An error is returned if
the
- /// file does not contain this stream, or the stream is smaller than t
@@ -53,6 +54,31 @@ Expected MinidumpFile::getString(size_t Offset)
const {
return Result;
}
+Expected>
+MinidumpFile::getExceptionStreams() const {
+ // Scan the directories for exceptions first
+ std::vector exceptionStreams;
+ for (const auto &directory : Streams) {
+
@@ -9,6 +9,7 @@
#include "llvm/Object/Minidump.h"
#include "llvm/Object/Error.h"
#include "llvm/Support/ConvertUTF.h"
+#include
jeffreytan81 wrote:
Is this needed?
https://github.com/llvm/llvm-project/pull/97470
_
@@ -109,7 +109,7 @@ class ProcessMinidump : public PostMortemProcess {
private:
lldb::DataBufferSP m_core_data;
llvm::ArrayRef m_thread_list;
- const minidump::ExceptionStream *m_active_exception;
+ std::unordered_map m_exceptions_by_tid;
jeffreytan81 wro
@@ -82,15 +82,24 @@ class MinidumpFile : public Binary {
return getListStream(minidump::StreamType::ThreadList);
}
- /// Returns the contents of the Exception stream. An error is returned if
the
- /// file does not contain this stream, or the stream is smaller than t
@@ -209,7 +208,20 @@ Status ProcessMinidump::DoLoadCore() {
GetTarget().SetArchitecture(arch, true /*set_platform*/);
m_thread_list = m_minidump_parser->GetThreads();
- m_active_exception = m_minidump_parser->GetExceptionStream();
+ std::vector exception_streams =
--
https://github.com/jeffreytan81 edited
https://github.com/llvm/llvm-project/pull/97470
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/Jlalond edited
https://github.com/llvm/llvm-project/pull/97470
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/Jlalond updated
https://github.com/llvm/llvm-project/pull/97470
>From dc4730dcff31c2c9212d2ce5412ecb8a9f4d83c0 Mon Sep 17 00:00:00 2001
From: Jacob Lalonde
Date: Tue, 2 Jul 2024 12:41:02 -0700
Subject: [PATCH 1/5] Add support to read multiple exception streams in
minidumps
https://github.com/Jlalond edited
https://github.com/llvm/llvm-project/pull/97470
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -0,0 +1,39 @@
+--- !minidump
+Streams:
+ - Type:ThreadList
+Threads:
+ - Thread Id: 0x1B4F23
+Context:
0B00100033
llvmbot wrote:
@llvm/pr-subscribers-llvm-binary-utilities
Author: Jacob Lalonde (Jlalond)
Changes
Currently, LLDB assumes all minidumps will have unique sections. This is
intuitive because almost all of the minidump sections are themselves lists.
Exceptions including Signals are unique i
https://github.com/Jlalond ready_for_review
https://github.com/llvm/llvm-project/pull/97470
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/Jlalond updated
https://github.com/llvm/llvm-project/pull/97470
>From e8d1f3a7f978bd3c5767f0b0cacea60146a257f7 Mon Sep 17 00:00:00 2001
From: Jacob Lalonde
Date: Tue, 2 Jul 2024 12:41:02 -0700
Subject: [PATCH 1/4] Add support to read multiple exception streams in
minidumps
https://github.com/Jlalond edited
https://github.com/llvm/llvm-project/pull/97470
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
35 matches
Mail list logo