[Lldb-commits] [PATCH] D32167: Add support for type units (.debug_types) to LLDB in a way that is compatible with DWARF 5

2018-02-26 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: packages/Python/lldbsuite/test/make/Makefile.rules:197
+ifeq "$(DWARF_TYPE_UNITS)" "YES"
+   DEBUG_INFO_FLAG ?= -gdwarf-4
+else

clayborg wrote:
> aprantl wrote:
> > This shouldn't be necessary on any platform LLDB cares about. DWARF 4 
> > should be the default everywhere.
> Ok, I can remove this.
FreeBSD still defaults to DWARF2 at present.


https://reviews.llvm.org/D32167



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32125: [LLVM][MIPS] Fix different definition of off_t in LLDB and LLVM

2017-04-21 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

In https://reviews.llvm.org/D32125#728166, @krytarowski wrote:

> Is this just GNU specific? BSD moved to 64-bit off_t on 32-bit platforms 20+ 
> years ago.
>
> It's perhaps no-op, but it might be noted in the commit message what 
> platforms are supposed to be improved.


I'd say it's better to put a comment in the source where it's set.


https://reviews.llvm.org/D32125



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32271: Patch to Attach pid successfully from different dir

2017-04-21 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Sorry I've been away from LLDB for a bit, I will take a look at this soon.


Repository:
  rL LLVM

https://reviews.llvm.org/D32271



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32271: Patch to Attach pid successfully from different dir

2017-04-23 Thread Ed Maste via Phabricator via lldb-commits
emaste updated this revision to Diff 96334.
emaste added a comment.

Slightly simpler approach after early returns added in 
https://reviews.llvm.org/rL301100


https://reviews.llvm.org/D32271

Files:
  source/Host/freebsd/Host.cpp


Index: source/Host/freebsd/Host.cpp
===
--- source/Host/freebsd/Host.cpp
+++ source/Host/freebsd/Host.cpp
@@ -76,7 +76,14 @@
   if (!cstr)
 return false;
 
-  process_info.GetExecutableFile().SetFile(cstr, false);
+  // Get pathname for pid. If that fails fall back go argv[0].
+  char pathname[MAXPATHLEN];
+  size_t pathname_len = sizeof(pathname);
+  mib[2] = KERN_PROC_PATHNAME;
+  if (::sysctl(mib, 4, pathname, &len, NULL, 0) == 0)
+process_info.GetExecutableFile().SetFile(pathname, false);
+  else
+process_info.GetExecutableFile().SetFile(cstr, false);
 
   if (!(match_info_ptr == NULL ||
 
NameMatches(process_info.GetExecutableFile().GetFilename().GetCString(),


Index: source/Host/freebsd/Host.cpp
===
--- source/Host/freebsd/Host.cpp
+++ source/Host/freebsd/Host.cpp
@@ -76,7 +76,14 @@
   if (!cstr)
 return false;
 
-  process_info.GetExecutableFile().SetFile(cstr, false);
+  // Get pathname for pid. If that fails fall back go argv[0].
+  char pathname[MAXPATHLEN];
+  size_t pathname_len = sizeof(pathname);
+  mib[2] = KERN_PROC_PATHNAME;
+  if (::sysctl(mib, 4, pathname, &len, NULL, 0) == 0)
+process_info.GetExecutableFile().SetFile(pathname, false);
+  else
+process_info.GetExecutableFile().SetFile(cstr, false);
 
   if (!(match_info_ptr == NULL ||
 NameMatches(process_info.GetExecutableFile().GetFilename().GetCString(),
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32271: Patch to Attach pid successfully from different dir

2017-04-24 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

In https://reviews.llvm.org/D32271#735098, @krytarowski wrote:

> I have plan to revisit corresponding files in NetBSD and switch from kvm(3) 
> to sysctl(3). But this is lower priority than Process Plugin right now.


Thanks for the note. I wasn't aware that you had that planned, but I 
incorporated the improvements you made in NetBSD's Host.cpp (early returns 
etc.) in order to reduce diffs and facilitate shared effort on these bits at 
some point.


https://reviews.llvm.org/D32271



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32271: Patch to Attach pid successfully from different dir

2017-04-30 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Test case in https://reviews.llvm.org/D32522


https://reviews.llvm.org/D32271



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32522: Test case for the issue raised in D32271

2017-04-30 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: 
packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py:43
+   def test_attach_to_process_frm_different_dir_by_id(self):
+   """Test attach by process id"""
+os.mkdir(os.path.join(os.getcwd(),'newdir'))

whitespace issue here in raw diff



https://reviews.llvm.org/D32522



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32522: Test case for the issue raised in D32271

2017-04-30 Thread Ed Maste via Phabricator via lldb-commits
emaste requested changes to this revision.
emaste added a comment.
This revision now requires changes to proceed.

This test passes even without the change in https://reviews.llvm.org/D32271, 
presumably because `exe = os.path.join(os.getcwd(), 'newdir/proc_attach')` is 
providing us with an absolute path for `argv[0]`.

With a change like that below the test passes with 
https://reviews.llvm.org/D32271 and fails without it:

  os.chdir('newdir')
  # Spawn a new process
  popen = self.spawnSubprocess('./proc_attach')
  os.chdir('..')


https://reviews.llvm.org/D32522



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32820: Parallelize demangling

2017-05-18 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

> Without tcmalloc, on Ubuntu 14.04, 40 core VM: 13%
>  With tcmalloc, on Ubuntu 14.04, 40 core VM: 24% (built using cmake ... 
> -DCMAKE_EXE_LINKER_FLAGS=-ltcmalloc_minimal, which amazingly only works when 
> building with clang, not gcc...)

Do you have a brief set of steps you use for benchmarking? I'd like to compare 
on FreeBSD using a similar test.


Repository:
  rL LLVM

https://reviews.llvm.org/D32820



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32522: Test case for the issue raised in D32271

2017-05-19 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Two small nits noted inline, but now the test does not pass without 
https://reviews.llvm.org/D32271 and does with it. Note that in the "without" 
case it returned error rather than failing, perhaps related to the path issue I 
noted?

Other than that issue I think this is good to go. So hopefully that can be 
addressed, then one of the Linux folks can confirm it's good to go. IMO it's 
fine for this to go in first demonstrating the bug on FreeBSD followed by a 
commit of https://reviews.llvm.org/D32271.




Comment at: 
packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py:42
 
+def test_attach_to_process_frm_different_dir_by_id(self):
+"""Test attach by process id"""

s/frm/from/ perhaps?



Comment at: 
packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py:47
+exe = os.path.join('.','newdir','proc_attach')
+self.addTearDownHook(lambda: shutil.rmtree(os.path.join(os.getcwd(
+

shouldn't this be ... `rmtree(os.path.join(os.getcwd(), 'newdir'))` instead?


Repository:
  rL LLVM

https://reviews.llvm.org/D32522



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32271: Patch to Attach pid successfully from different dir

2017-05-19 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

In https://reviews.llvm.org/D32271#759361, @dim wrote:

> As I found out in https://reviews.llvm.org/rL303015, the `KERN_PROC_PATHNAME` 
> has one drawback: if an executable file has multiple hard links, you will get 
> just one of its filenames as the result.  Since that filename is more or less 
> randomly chosen, it does *not* have to correspond to the actual `argv[0]` the 
> executable was invoked with.  If that does not matter, this approach is fine, 
> though.


Thanks @dim, it's because of https://reviews.llvm.org/rL303015 that I added you 
to CC.

Thinking about this further, I think that in this (LLDB) case it's acceptable 
(even if it might prove slightly surprising). If we attach via `-p ` this 
code is used to find the corresponding binary, and even if we open the file by 
the "wrong" name we still have the correct content.


https://reviews.llvm.org/D32271



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32522: Test case for the issue raised in D32271

2017-05-30 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Generally LGTM with two questions inline.




Comment at: 
packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py:45
+os.mkdir(os.path.join(os.getcwd(),'newdir'))
+self.buildProgram('main.cpp','newdir/proc_attach')
+exe = os.path.join('.','newdir','proc_attach')

Does this one need to use `os.path.join` too?



Comment at: 
packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py:53
+
+os.chdir('newdir')
+self.runCmd("process attach -p " + str(popen.pid))

Does the test infra automatically start each test in the correct directory? 
(I.e., chdir back to the original directory is not required?)


https://reviews.llvm.org/D32522



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D34274: Remove home-grown thread-local storage wrappers

2017-06-16 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Fine from FreeBSD


https://reviews.llvm.org/D34274



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D34236: Delete ProcessLauncherPosix

2017-06-16 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

FreeBSD build and test in progress.


https://reviews.llvm.org/D34236



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D34236: Delete ProcessLauncherPosix

2017-06-17 Thread Ed Maste via Phabricator via lldb-commits
emaste accepted this revision.
emaste added a comment.

LGTM from the FreeBSD side. The launch code for FreeBSD came from the original 
(in-process) implementation that Linux and FreeBSD shared.


https://reviews.llvm.org/D34236



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D34776: Make i386-*-freebsd expression work on JIT path

2017-08-07 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Sorry I missed this when first uploaded, I will look at it shortly.

For future uploads can you kindly include full context, as described in 
https://llvm.org/docs/Phabricator.html?


https://reviews.llvm.org/D34776



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D35223: Report inferior SIGSEGV/SIGILL/SIGBUS/SIGFPE as a signal instead of an exception on freebsd

2017-08-07 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Sorry I missed this when first uploaded, I will look at it shortly.

For future uploads can you kindly include full context, as described in 
https://llvm.org/docs/Phabricator.html?


Repository:
  rL LLVM

https://reviews.llvm.org/D35223



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D35223: Report inferior SIGSEGV/SIGILL/SIGBUS/SIGFPE as a signal instead of an exception on freebsd

2017-08-07 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

The patch LGTM, I will test it soon.


Repository:
  rL LLVM

https://reviews.llvm.org/D35223



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D35223: Report inferior SIGSEGV/SIGILL/SIGBUS/SIGFPE as a signal instead of an exception on freebsd

2017-08-07 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

With this patch I observed three new failures on FreeBSD and three new 
unexpected passes on FreeBSD. An example of a new failure:

  ==
  FAIL: test_inferior_crashing_expr_step_and_expr_dwarf 
(TestInferiorCrashing.CrashingInferiorTestCase)
 Test that lldb expressions work before and after stepping after a crash.
  --
  Traceback (most recent call last):
File 
"/tank/emaste/src/llvm/tools/lldb/packages/Python/lldbsuite/test/lldbtest.py", 
line 1732, in dwarf_test_method
  return attrvalue(self)
File 
"/tank/emaste/src/llvm/tools/lldb/packages/Python/lldbsuite/test/decorators.py",
 line 110, in wrapper
  func(*args, **kwargs)
File 
"/tank/emaste/src/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py",
 line 82, in test_inferior_crashing_expr_step_and_expr
  self.inferior_crashing_expr_step_expr()
File 
"/tank/emaste/src/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py",
 line 249, in inferior_crashing_expr_step_expr
  self.check_stop_reason()
File 
"/tank/emaste/src/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py",
 line 93, in check_stop_reason
  STOPPED_DUE_TO_EXC_BAD_ACCESS)
  AssertionError: 0 != 1 : Process should be stopped due to bad access exception
  Config=x86_64-/usr/bin/cc
  --
  Ran 7 tests in 4.320s

From lldbsuite/test/lldbutil.py:

  def is_thread_crashed(test, thread):
  """In the test suite we dereference a null pointer to simulate a crash. 
The way this is
  reported depends on the platform."""
  if test.platformIsDarwin():
  return thread.GetStopReason(
  ) == lldb.eStopReasonException and "EXC_BAD_ACCESS" in 
thread.GetStopDescription(100)
  elif test.getPlatform() == "linux":
  return thread.GetStopReason() == lldb.eStopReasonSignal and 
thread.GetStopReasonDataAtIndex(
  0) == 
thread.GetProcess().GetUnixSignals().GetSignalNumberFromName("SIGSEGV")
  else:
  return "invalid address" in thread.GetStopDescription(100)

Presumably we want the second case to apply on FreeBSD as well when this patch 
is in, although I don't see why the existing else case shouldn't continue to 
work correctly.


Repository:
  rL LLVM

https://reviews.llvm.org/D35223



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D34776: Make i386-*-freebsd expression work on JIT path

2017-08-07 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

The change in PlatformOpenBSD.cpp failed to apply for me (although it was 
trivial to manually apply it).


https://reviews.llvm.org/D34776



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D34776: Make i386-*-freebsd expression work on JIT path

2017-08-07 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

With this patch i386 test results are comparable to amd64, and I'm happy with 
it from a FreeBSD perspective (modulo the PlatformOpenBSD patch conflict).


https://reviews.llvm.org/D34776



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D35223: Report inferior SIGSEGV/SIGILL/SIGBUS/SIGFPE as a signal instead of an exception on freebsd

2017-08-08 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

> Actually, I think you probably need to extend the @skipIfLinux to apply to 
> freebsd as well.

Oh, I mistook the source of the check_stop_reason assertion failure -- I 
thought it was asserting before the step. In this case I agree the test should 
be skipped on FreeBSD.


Repository:
  rL LLVM

https://reviews.llvm.org/D35223



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D34776: Make i386-*-freebsd expression work on JIT path

2017-08-09 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

I've committed this to FreeBSD's copy of lldb in r322326 
. @labath if you're happy with this patch 
I will commit to lldb for @karnajitw. I'm not sure how the patch ended up with 
a conflict, but it's just a whitespace issue.


https://reviews.llvm.org/D34776



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D35223: Report inferior SIGSEGV/SIGILL/SIGBUS/SIGFPE as a signal instead of an exception on freebsd

2017-08-09 Thread Ed Maste via Phabricator via lldb-commits
emaste accepted this revision.
emaste added a comment.
This revision is now accepted and ready to land.

Still would appreciate diffs uploaded with full context - i.e.,

  Note that you can upload patches created through various diff tools, 
including git and svn. To make reviews easier, please always include as much 
context as possible with your diff! Don’t worry, Phabricator will automatically 
send a diff with a smaller context in the review email, but having the full 
file in the web interface will help the reviewer understand your code.
  
  To get a full diff, use one of the following commands (or just use Arcanist 
to upload your patch):
  
  git show HEAD -U99 > mypatch.patch
  git format-patch -U99 @{u}
  svn diff --diff-cmd=diff -x -U99

However, patch looks good to me.


Repository:
  rL LLVM

https://reviews.llvm.org/D35223



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D35223: Report inferior SIGSEGV/SIGILL/SIGBUS/SIGFPE as a signal instead of an exception on freebsd

2017-08-10 Thread Ed Maste via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL310591: Report inferior signals as signals, not exceptions, 
on FreeBSD (authored by emaste).

Changed prior to commit:
  https://reviews.llvm.org/D35223?vs=110438&id=110572#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D35223

Files:
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py
  lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
  lldb/trunk/source/Plugins/Process/FreeBSD/POSIXStopInfo.cpp
  lldb/trunk/source/Plugins/Process/FreeBSD/POSIXStopInfo.h
  lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp

Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py
@@ -17,9 +17,6 @@
 mydir = TestBase.compute_mydir(__file__)
 
 @expectedFailureAll(
-oslist=['freebsd'],
-bugnumber="llvm.org/pr23699 SIGSEGV is reported as exception, not signal")
-@expectedFailureAll(
 oslist=["windows"],
 bugnumber="llvm.org/pr24778, This actually works, but the test relies on the output format instead of the API")
 def test_inferior_crashing(self):
@@ -60,7 +57,6 @@
 self.build()
 self.inferior_crashing_step()
 
-@expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr24939')
 @expectedFailureAll(
 oslist=["windows"],
 bugnumber="llvm.org/pr24778, This actually works, but the test relies on the output format instead of the API")
@@ -76,6 +72,7 @@
 # Inferior exits after stepping after a segfault. This is working as
 # intended IMHO.
 @skipIfLinux
+@skipIfFreeBSD
 def test_inferior_crashing_expr_step_and_expr(self):
 """Test that lldb expressions work before and after stepping after a crash."""
 self.build()
@@ -110,7 +107,7 @@
 # The exact stop reason depends on the platform
 if self.platformIsDarwin():
 stop_reason = 'stop reason = EXC_BAD_ACCESS'
-elif self.getPlatform() == "linux":
+elif self.getPlatform() == "linux" or self.getPlatform() == "freebsd":
 stop_reason = 'stop reason = signal SIGSEGV'
 else:
 stop_reason = 'stop reason = invalid address'
Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
@@ -16,9 +16,6 @@
 
 mydir = TestBase.compute_mydir(__file__)
 
-@expectedFailureAll(
-oslist=['freebsd'],
-bugnumber="llvm.org/pr23699 SIGSEGV is reported as exception, not signal")
 @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
 def test_recursive_inferior_crashing(self):
 """Test that lldb reliably catches the inferior crashing (command)."""
@@ -50,7 +47,6 @@
 self.build()
 self.recursive_inferior_crashing_step()
 
-@expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr24939')
 @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
 @skipIfTargetAndroid()  # debuggerd interferes with this test on Android
 def test_recursive_inferior_crashing_step_after_break(self):
@@ -61,6 +57,7 @@
 # Inferior exits after stepping after a segfault. This is working as
 # intended IMHO.
 @skipIfLinux
+@skipIfFreeBSD
 @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
 def test_recursive_inferior_crashing_expr_step_and_expr(self):
 """Test that lldb expressions work before and after stepping after a crash."""
@@ -94,7 +91,7 @@
 # The exact stop reason depends on the platform
 if self.platformIsDarwin():
 stop_reason = 'stop reason = EXC_BAD_ACCESS'
-elif self.getPlatform() == "linux":
+elif self.getPlatform() == "linux" or self.getPlatform() == "freebsd":
 stop_reason = 'stop reason = signal SIGSEGV'
 else:
 stop_reason = 'stop reason = invalid address'
Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py
=

[Lldb-commits] [PATCH] D32522: Test case for the issue raised in D32271

2017-08-13 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Ping for two open questions


https://reviews.llvm.org/D32522



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D34776: Make i386-*-freebsd expression work on JIT path

2017-08-16 Thread Ed Maste via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL311002: Make i386-*-freebsd expression work on JIT path 
(authored by emaste).

Changed prior to commit:
  https://reviews.llvm.org/D34776?vs=104984&id=111331#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D34776

Files:
  lldb/trunk/include/lldb/Target/Platform.h
  lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
  lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
  lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
  lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
  lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h
  lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
  lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h
  lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp
  lldb/trunk/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.h
  lldb/trunk/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
  lldb/trunk/source/Target/Platform.cpp

Index: lldb/trunk/source/Target/Platform.cpp
===
--- lldb/trunk/source/Target/Platform.cpp
+++ lldb/trunk/source/Target/Platform.cpp
@@ -1316,14 +1316,18 @@
   return error;
 }
 
-uint64_t Platform::ConvertMmapFlagsToPlatform(const ArchSpec &arch,
-  unsigned flags) {
+MmapArgList Platform::GetMmapArgumentList(const ArchSpec &arch, addr_t addr,
+  addr_t length, unsigned prot,
+  unsigned flags, addr_t fd,
+  addr_t offset) {
   uint64_t flags_platform = 0;
   if (flags & eMmapFlagsPrivate)
 flags_platform |= MAP_PRIVATE;
   if (flags & eMmapFlagsAnon)
 flags_platform |= MAP_ANON;
-  return flags_platform;
+
+  MmapArgList args({addr, length, prot, flags_platform, fd, offset});
+  return args;
 }
 
 lldb_private::Status Platform::RunShellCommand(
Index: lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
===
--- lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
+++ lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
@@ -206,7 +206,7 @@
 ABISysV_i386::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
   static ABISP g_abi_sp;
   if ((arch.GetTriple().getArch() == llvm::Triple::x86) &&
-  arch.GetTriple().isOSLinux()) {
+  (arch.GetTriple().isOSLinux() || arch.GetTriple().isOSFreeBSD())) {
 if (!g_abi_sp)
   g_abi_sp.reset(new ABISysV_i386(process_sp));
 return g_abi_sp;
Index: lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
===
--- lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
+++ lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
@@ -420,13 +420,17 @@
   m_trap_handlers.push_back(ConstString("_sigtramp"));
 }
 
-uint64_t PlatformNetBSD::ConvertMmapFlagsToPlatform(const ArchSpec &arch,
-   unsigned flags) {
+MmapArgList PlatformNetBSD::GetMmapArgumentList(const ArchSpec &arch,
+addr_t addr, addr_t length,
+unsigned prot, unsigned flags,
+addr_t fd, addr_t offset) {
   uint64_t flags_platform = 0;
 
   if (flags & eMmapFlagsPrivate)
 flags_platform |= MAP_PRIVATE;
   if (flags & eMmapFlagsAnon)
 flags_platform |= MAP_ANON;
-  return flags_platform;
+
+  MmapArgList args({addr, length, prot, flags_platform, fd, offset});
+  return args;
 }
Index: lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h
===
--- lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h
+++ lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h
@@ -59,8 +59,10 @@
 
   void CalculateTrapHandlerSymbolNames() override;
 
-  uint64_t ConvertMmapFlagsToPlatform(const ArchSpec &arch,
-  unsigned flags) override;
+  MmapArgList GetMmapArgumentList(const ArchSpec &arch, lldb::addr_t addr,
+  lldb::addr_t length, unsigned prot,
+  unsigned flags, lldb::addr_t fd,
+  lldb::addr_t offset) override;
 
 private:
   DISALLOW_COPY_AND_ASSIGN(PlatformNetBSD);
Index: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h
===
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h
@@ -59,8 +59,10 @@
 
   void CalculateTrapHandlerSymbolNames() override;
 
-  uint64_t ConvertMmapFlagsToPlatform(const ArchSpec &arch,
-  unsigned fla

[Lldb-commits] [PATCH] D32522: Test case for the issue raised in D32271

2017-09-02 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Testing this just now I got:

  FAIL: LLDB (/usr/bin/cc-x86_64) :: 
test_attach_to_process_from_different_dir_by_id 
(TestProcessAttach.ProcessAttachTestCase)
  ==
  
  ERROR: test_attach_to_process_from_different_dir_by_id 
(TestProcessAttach.ProcessAttachTestCase)
 Test attach by process id  
  
  --
  
  Traceback (most recent call last):
  
File 
"/tank/emaste/src/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py",
 line 44, in test_attach_to_process_from_different_dir_by_id
  os.mkdir(os.path.join(os.getcwd(),'newdir'))  
  
  OSError: [Errno 17] File exists: 
'/tank/emaste/src/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/newdir'
  Config=x86_64-/usr/bin/cc 
  

investigating...


https://reviews.llvm.org/D32522



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32522: Test case for the issue raised in D32271

2017-09-02 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: 
packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py:44
+"""Test attach by process id"""
+os.mkdir(os.path.join(os.getcwd(),'newdir'))
+
self.buildProgram('main.cpp',os.path.join(os.getcwd(),'newdir','proc_attach'))

Perhaps
```
try:   
os.mkdir(os.path.join(os.getcwd(),'newdir'))   
except OSError, e: 
if e.errno != os.errno.EEXIST: 
raise  
```


https://reviews.llvm.org/D32522



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32271: Patch to Attach pid successfully from different dir

2017-09-02 Thread Ed Maste via Phabricator via lldb-commits
emaste updated this revision to Diff 113664.
emaste added a comment.

correct variable


https://reviews.llvm.org/D32271

Files:
  source/Host/freebsd/Host.cpp


Index: source/Host/freebsd/Host.cpp
===
--- source/Host/freebsd/Host.cpp
+++ source/Host/freebsd/Host.cpp
@@ -73,7 +73,14 @@
   if (!cstr)
 return false;
 
-  process_info.GetExecutableFile().SetFile(cstr, false);
+  // Get pathname for pid. If that fails fall back to argv[0].
+  char pathname[MAXPATHLEN];
+  size_t pathname_len = sizeof(pathname);
+  mib[2] = KERN_PROC_PATHNAME;
+  if (::sysctl(mib, 4, pathname, &pathname_len, NULL, 0) == 0)
+process_info.GetExecutableFile().SetFile(pathname, false);
+  else
+process_info.GetExecutableFile().SetFile(cstr, false);
 
   if (!(match_info_ptr == NULL ||
 
NameMatches(process_info.GetExecutableFile().GetFilename().GetCString(),


Index: source/Host/freebsd/Host.cpp
===
--- source/Host/freebsd/Host.cpp
+++ source/Host/freebsd/Host.cpp
@@ -73,7 +73,14 @@
   if (!cstr)
 return false;
 
-  process_info.GetExecutableFile().SetFile(cstr, false);
+  // Get pathname for pid. If that fails fall back to argv[0].
+  char pathname[MAXPATHLEN];
+  size_t pathname_len = sizeof(pathname);
+  mib[2] = KERN_PROC_PATHNAME;
+  if (::sysctl(mib, 4, pathname, &pathname_len, NULL, 0) == 0)
+process_info.GetExecutableFile().SetFile(pathname, false);
+  else
+process_info.GetExecutableFile().SetFile(cstr, false);
 
   if (!(match_info_ptr == NULL ||
 NameMatches(process_info.GetExecutableFile().GetFilename().GetCString(),
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32271: Patch to Attach pid successfully from different dir

2017-09-02 Thread Ed Maste via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL312430: FreeBSD: attach to pid from different cwd (authored 
by emaste).

Changed prior to commit:
  https://reviews.llvm.org/D32271?vs=113664&id=113669#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D32271

Files:
  lldb/trunk/source/Host/freebsd/Host.cpp


Index: lldb/trunk/source/Host/freebsd/Host.cpp
===
--- lldb/trunk/source/Host/freebsd/Host.cpp
+++ lldb/trunk/source/Host/freebsd/Host.cpp
@@ -73,7 +73,14 @@
   if (!cstr)
 return false;
 
-  process_info.GetExecutableFile().SetFile(cstr, false);
+  // Get pathname for pid. If that fails fall back to argv[0].
+  char pathname[MAXPATHLEN];
+  size_t pathname_len = sizeof(pathname);
+  mib[2] = KERN_PROC_PATHNAME;
+  if (::sysctl(mib, 4, pathname, &pathname_len, NULL, 0) == 0)
+process_info.GetExecutableFile().SetFile(pathname, false);
+  else
+process_info.GetExecutableFile().SetFile(cstr, false);
 
   if (!(match_info_ptr == NULL ||
 
NameMatches(process_info.GetExecutableFile().GetFilename().GetCString(),


Index: lldb/trunk/source/Host/freebsd/Host.cpp
===
--- lldb/trunk/source/Host/freebsd/Host.cpp
+++ lldb/trunk/source/Host/freebsd/Host.cpp
@@ -73,7 +73,14 @@
   if (!cstr)
 return false;
 
-  process_info.GetExecutableFile().SetFile(cstr, false);
+  // Get pathname for pid. If that fails fall back to argv[0].
+  char pathname[MAXPATHLEN];
+  size_t pathname_len = sizeof(pathname);
+  mib[2] = KERN_PROC_PATHNAME;
+  if (::sysctl(mib, 4, pathname, &pathname_len, NULL, 0) == 0)
+process_info.GetExecutableFile().SetFile(pathname, false);
+  else
+process_info.GetExecutableFile().SetFile(cstr, false);
 
   if (!(match_info_ptr == NULL ||
 NameMatches(process_info.GetExecutableFile().GetFilename().GetCString(),
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D32522: Test case for the issue raised in D32271

2017-09-02 Thread Ed Maste via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL312431: Add test case for attach-by-pid from different cwd 
(authored by emaste).

Changed prior to commit:
  https://reviews.llvm.org/D32522?vs=113067&id=113671#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D32522

Files:
  
lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py


Index: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
===
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
@@ -8,6 +8,7 @@
 import os
 import time
 import lldb
+import shutil
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
@@ -38,6 +39,29 @@
 process = target.GetProcess()
 self.assertTrue(process, PROCESS_IS_VALID)
 
+def test_attach_to_process_from_different_dir_by_id(self):
+"""Test attach by process id"""
+try:
+os.mkdir(os.path.join(os.getcwd(),'newdir'))
+except OSError, e:
+if e.errno != os.errno.EEXIST:
+raise
+
self.buildProgram('main.cpp',os.path.join(os.getcwd(),'newdir','proc_attach'))
+exe = os.path.join('.','newdir','proc_attach')
+self.addTearDownHook(lambda: shutil.rmtree(os.path.join(os.getcwd(
+
+# Spawn a new process
+popen = self.spawnSubprocess(exe)
+self.addTearDownHook(self.cleanupSubprocesses)
+
+os.chdir('newdir')
+self.runCmd("process attach -p " + str(popen.pid))
+
+target = self.dbg.GetSelectedTarget()
+
+process = target.GetProcess()
+self.assertTrue(process, PROCESS_IS_VALID)
+
 def test_attach_to_process_by_name(self):
 """Test attach by process name"""
 self.build()


Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
===
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
@@ -8,6 +8,7 @@
 import os
 import time
 import lldb
+import shutil
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
@@ -38,6 +39,29 @@
 process = target.GetProcess()
 self.assertTrue(process, PROCESS_IS_VALID)
 
+def test_attach_to_process_from_different_dir_by_id(self):
+"""Test attach by process id"""
+try:
+os.mkdir(os.path.join(os.getcwd(),'newdir'))
+except OSError, e:
+if e.errno != os.errno.EEXIST:
+raise
+self.buildProgram('main.cpp',os.path.join(os.getcwd(),'newdir','proc_attach'))
+exe = os.path.join('.','newdir','proc_attach')
+self.addTearDownHook(lambda: shutil.rmtree(os.path.join(os.getcwd(
+
+# Spawn a new process
+popen = self.spawnSubprocess(exe)
+self.addTearDownHook(self.cleanupSubprocesses)
+
+os.chdir('newdir')
+self.runCmd("process attach -p " + str(popen.pid))
+
+target = self.dbg.GetSelectedTarget()
+
+process = target.GetProcess()
+self.assertTrue(process, PROCESS_IS_VALID)
+
 def test_attach_to_process_by_name(self):
 """Test attach by process name"""
 self.build()
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D27115: [cleanup] Fix typos in file headers

2016-11-25 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

I checked the FreeBSD parts, looks good. Thanks for doing this!


Repository:
  rL LLVM

https://reviews.llvm.org/D27115



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D27126: Merge Linux and FreeBSD arm register contexts

2016-11-25 Thread Ed Maste via Phabricator via lldb-commits
emaste added a subscriber: dmikulin.
emaste added a comment.

I think @dmikulin might be able to test this


https://reviews.llvm.org/D27126



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D25756: FreeBSD ARM support for software single step.

2016-11-30 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp:551-557
+} else {
+  static const uint8_t g_arm_breakpoint_opcode[] = {0xFE,0xDE,0xFF,0xE7};
+  size_t trap_opcode_size = sizeof(g_arm_breakpoint_opcode);
+  assert(bp_site);
+  if (bp_site->SetTrapOpcode(g_arm_breakpoint_opcode, trap_opcode_size))
+return trap_opcode_size;
 }

according to LLVM style this should be promoted out of an `else` block because 
of the `return` above (use early exits / don't use else after a return).

As an aside it appears 0xe7fddefe is ARM-recommended breakpoint opcode and 
Linux is the outlier. So the generic Platform::GetSoftwareBreakpointTrapOpcode 
ought to use 0xFE,0xDE,0xFF,0xE7, with 
PlatformLinux::GetSoftwareBreakpointTrapOpcode having the override?




Comment at: source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp:957
+
+  // The emulator only fill in the dwarf regsiter numbers (and in some case
+  // the generic register numbers). Get the full register info from the

Few typo / nits:

only fill**s** in
s/regsiter/register/
in some case**s**



Comment at: source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp:1063
+  if (emulator_ap == nullptr) {
+printf("Error: Instruction emulator not found!\n");
+return;

We should really be returning an `Error` from this fn instead, no?



Comment at: source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp:1101-1104
+// Emulate instruction failed and it haven't changed PC. Advance PC
+// with the size of the current opcode because the emulation of all
+// PC modifying instruction should be successful. The failure most
+// likely caused by a not supported instruction which don't modify PC.

Hope you don't mind a minor rewording of the comment:

The emulated instruction failed and it did not change the PC. Advance the PC by 
the size of the current opcode, as all PC-modifying instructions should be 
successfully emulated. The failure was most likely caused by an unsupported 
instruction.


Repository:
  rL LLVM

https://reviews.llvm.org/D25756



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D27126: Merge Linux and FreeBSD arm register contexts

2016-11-30 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

In https://reviews.llvm.org/D27126#609150, @labath wrote:

> In https://reviews.llvm.org/D27126#607057, @dmikulin wrote:
>
> > I can run tests on 32bit ARM FreeBSD 11.RC3 rpi2, but without software 
> > single step not a lot of tests pass on ARM FreeBSD ;)
> >  Can we get https://reviews.llvm.org/D25756 committed?
>
>
> I'll leave that decision up to Ed.
>  I am not particularly fond of copying code around, but I do see the value of 
> having some freebsd arm support instead of none.


I'd be happy for https://reviews.llvm.org/D25756 to go in, but have a few 
comments added just now that should be addressed.


https://reviews.llvm.org/D27126



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D25756: FreeBSD ARM support for software single step.

2017-01-24 Thread Ed Maste via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL292937: FreeBSD ARM support for software single step 
(authored by emaste).

Changed prior to commit:
  https://reviews.llvm.org/D25756?vs=79987&id=85581#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D25756

Files:
  lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
  lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
  lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h
  lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp

Index: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
===
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
@@ -1141,11 +1141,19 @@
 
   case SI_KERNEL:
   case TRAP_BRKPT:
-if (log)
-  log->Printf(
-  "ProcessMonitor::%s() received breakpoint event, tid = %" PRIu64,
-  __FUNCTION__, tid);
-message = ProcessMessage::Break(tid);
+if (monitor->m_process->IsSoftwareStepBreakpoint(tid)) {
+  if (log)
+log->Printf("ProcessMonitor::%s() received sw single step breakpoint "
+"event, tid = %" PRIu64,
+__FUNCTION__, tid);
+  message = ProcessMessage::Trace(tid);
+} else {
+  if (log)
+log->Printf(
+"ProcessMonitor::%s() received breakpoint event, tid = %" PRIu64,
+__FUNCTION__, tid);
+  message = ProcessMessage::Break(tid);
+}
 break;
   }
 
Index: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h
===
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h
@@ -171,7 +171,25 @@
   virtual FreeBSDThread *CreateNewFreeBSDThread(lldb_private::Process &process,
 lldb::tid_t tid);
 
+  static bool SingleStepBreakpointHit(
+  void *baton, lldb_private::StoppointCallbackContext *context,
+  lldb::user_id_t break_id, lldb::user_id_t break_loc_id);
+
+  lldb_private::Error SetupSoftwareSingleStepping(lldb::tid_t tid);
+
+  lldb_private::Error SetSoftwareSingleStepBreakpoint(lldb::tid_t tid,
+  lldb::addr_t addr);
+
+  bool IsSoftwareStepBreakpoint(lldb::tid_t tid);
+
+  bool SupportHardwareSingleStepping() const;
+
+  typedef std::vector tid_collection;
+  tid_collection &GetStepTids() { return m_step_tids; }
+
 protected:
+  static const size_t MAX_TRAP_OPCODE_SIZE = 8;
+
   /// Target byte order.
   lldb::ByteOrder m_byte_order;
 
@@ -207,10 +225,10 @@
 
   friend class FreeBSDThread;
 
-  typedef std::vector tid_collection;
   tid_collection m_suspend_tids;
   tid_collection m_run_tids;
   tid_collection m_step_tids;
+  std::map m_threads_stepping_with_breakpoint;
 
   int m_resume_signo;
 };
Index: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
===
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
@@ -13,6 +13,7 @@
 
 // C++ Includes
 #include 
+#include 
 
 // Other libraries and framework includes
 #include "lldb/Core/PluginManager.h"
@@ -122,6 +123,7 @@
 
   std::lock_guard guard(m_thread_list.GetMutex());
   bool do_step = false;
+  bool software_single_step = !SupportHardwareSingleStepping();
 
   for (tid_collection::const_iterator t_pos = m_run_tids.begin(),
   t_end = m_run_tids.end();
@@ -133,6 +135,11 @@
t_pos != t_end; ++t_pos) {
 m_monitor->ThreadSuspend(*t_pos, false);
 do_step = true;
+if (software_single_step) {
+  Error error = SetupSoftwareSingleStepping(*t_pos);
+  if (error.Fail())
+return error;
+}
   }
   for (tid_collection::const_iterator t_pos = m_suspend_tids.begin(),
   t_end = m_suspend_tids.end();
@@ -145,7 +152,7 @@
   if (log)
 log->Printf("process %" PRIu64 " resuming (%s)", GetID(),
 do_step ? "step" : "continue");
-  if (do_step)
+  if (do_step && !software_single_step)
 m_monitor->SingleStep(GetID(), m_resume_signo);
   else
 m_monitor->Resume(GetID(), m_resume_signo);
@@ -913,3 +920,194 @@
   "no platform or not the host - how did we get here with ProcessFreeBSD?");
   return DataBufferSP();
 }
+
+struct EmulatorBaton {
+  ProcessFreeBSD *m_process;
+  RegisterContext *m_reg_context;
+
+  // eRegisterKindDWARF -> RegisterValue
+  std::unordered_map m_register_values;
+
+  EmulatorBaton(ProcessFreeBSD *process, RegisterContext *reg_context)
+  : m_process(process), m_reg_context(reg_context) {}
+};
+
+static size_t ReadMemoryCallback(EmulateInstruction *instruction, void *baton,
+

[Lldb-commits] [PATCH] D29347: Transform ProcessLauncherLinux to ProcessLauncherPosixFork

2017-01-31 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

In https://reviews.llvm.org/D29347#662503, @labath wrote:

> @emaste: I'd suggest switching freebsd over to this process launcher as well. 
> I think it's the last user of the ProcessLauncherPosix, and it would enable 
> us to get rid of it.


Indeed. I won't be able to look at it until next week, but will try to switch 
it over as soon as possible.


Repository:
  rL LLVM

https://reviews.llvm.org/D29347



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D29667: Synchronize PlatformFreeBSD with Linux

2017-02-07 Thread Ed Maste via Phabricator via lldb-commits
emaste created this revision.

Inspired by https://reviews.llvm.org/rL294145 (https://reviews.llvm.org/D29266) 
for NetBSD, this reduces diffs between the FreeBSD and Linux/NetBSD Platform 
implementations. Further diff reduction will occur once FreeBSD switches to 
using the remote process plugin.

(Recreated to add lldb-commits)


https://reviews.llvm.org/D29667

Files:
  source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
  source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h

Index: source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
===
--- source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
+++ source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
@@ -10,103 +10,59 @@
 #ifndef liblldb_PlatformFreeBSD_h_
 #define liblldb_PlatformFreeBSD_h_
 
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Target/Platform.h"
+#include "Plugins/Platform/POSIX/PlatformPOSIX.h"
 
 namespace lldb_private {
 namespace platform_freebsd {
 
-class PlatformFreeBSD : public Platform {
+class PlatformFreeBSD : public PlatformPOSIX {
 public:
   PlatformFreeBSD(bool is_host);
 
   ~PlatformFreeBSD() override;
 
-  //
-  // Class functions
-  //
-  static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
-
   static void Initialize();
 
   static void Terminate();
 
-  static ConstString GetPluginNameStatic(bool is_host);
-
-  static const char *GetDescriptionStatic(bool is_host);
-
   //
   // lldb_private::PluginInterface functions
   //
-  ConstString GetPluginName() override { return GetPluginNameStatic(IsHost()); }
+  static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
 
-  uint32_t GetPluginVersion() override { return 1; }
+  static ConstString GetPluginNameStatic(bool is_host);
 
-  const char *GetDescription() override {
-return GetDescriptionStatic(IsHost());
-  }
+  static const char *GetPluginDescriptionStatic(bool is_host);
+
+  ConstString GetPluginName() override;
+
+  uint32_t GetPluginVersion() override { return 1; }
 
   //
   // lldb_private::Platform functions
   //
-  bool GetModuleSpec(const FileSpec &module_file_spec, const ArchSpec &arch,
- ModuleSpec &module_spec) override;
-
-  Error RunShellCommand(const char *command, const FileSpec &working_dir,
-int *status_ptr, int *signo_ptr,
-std::string *command_output,
-uint32_t timeout_sec) override;
-
-  size_t GetSoftwareBreakpointTrapOpcode(Target &target,
- BreakpointSite *bp_site) override;
-
-  bool GetRemoteOSVersion() override;
-
-  bool GetRemoteOSBuildString(std::string &s) override;
-
-  bool GetRemoteOSKernelDescription(std::string &s) override;
-
-  // Remote Platform subclasses need to override this function
-  ArchSpec GetRemoteSystemArchitecture() override;
-
-  bool IsConnected() const override;
-
-  Error ConnectRemote(Args &args) override;
+  const char *GetDescription() override {
+return GetPluginDescriptionStatic(IsHost());
+  }
 
-  Error DisconnectRemote() override;
+  void GetStatus(Stream &strm) override;
 
-  const char *GetHostname() override;
+  bool GetSupportedArchitectureAtIndex(uint32_t idx, ArchSpec &arch) override;
 
-  const char *GetUserName(uint32_t uid) override;
+  bool CanDebugProcess() override;
 
-  const char *GetGroupName(uint32_t gid) override;
+  size_t GetSoftwareBreakpointTrapOpcode(Target &target,
+ BreakpointSite *bp_site) override;
 
   Error LaunchProcess(ProcessLaunchInfo &launch_info) override;
 
   lldb::ProcessSP Attach(ProcessAttachInfo &attach_info, Debugger &debugger,
  Target *target, Error &error) override;
 
-  // FreeBSD processes can not be launched by spawning and attaching.
-  bool CanDebugProcess() override { return false; }
-
-  Error GetSharedModule(const ModuleSpec &module_spec, Process *process,
-lldb::ModuleSP &module_sp,
-const FileSpecList *module_search_paths_ptr,
-lldb::ModuleSP *old_module_sp_ptr,
-bool *did_create_ptr) override;
-
-  bool GetSupportedArchitectureAtIndex(uint32_t idx, ArchSpec &arch) override;
-
-  void GetStatus(Stream &strm) override;
-
   void CalculateTrapHandlerSymbolNames() override;
 
-protected:
-  lldb::PlatformSP m_remote_platform_sp; // Allow multiple ways to connect to a
- // remote freebsd OS
+  uint64_t ConvertMmapFl

[Lldb-commits] [PATCH] D29667: Synchronize PlatformFreeBSD with Linux

2017-02-07 Thread Ed Maste via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL294340: Synchronize PlatformFreeBSD with Linux (authored by 
emaste).

Changed prior to commit:
  https://reviews.llvm.org/D29667?vs=87482&id=87490#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D29667

Files:
  lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
  lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h

Index: lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
===
--- lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
+++ lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
@@ -10,103 +10,59 @@
 #ifndef liblldb_PlatformFreeBSD_h_
 #define liblldb_PlatformFreeBSD_h_
 
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Target/Platform.h"
+#include "Plugins/Platform/POSIX/PlatformPOSIX.h"
 
 namespace lldb_private {
 namespace platform_freebsd {
 
-class PlatformFreeBSD : public Platform {
+class PlatformFreeBSD : public PlatformPOSIX {
 public:
   PlatformFreeBSD(bool is_host);
 
   ~PlatformFreeBSD() override;
 
-  //
-  // Class functions
-  //
-  static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
-
   static void Initialize();
 
   static void Terminate();
 
-  static ConstString GetPluginNameStatic(bool is_host);
-
-  static const char *GetDescriptionStatic(bool is_host);
-
   //
   // lldb_private::PluginInterface functions
   //
-  ConstString GetPluginName() override { return GetPluginNameStatic(IsHost()); }
+  static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
 
-  uint32_t GetPluginVersion() override { return 1; }
+  static ConstString GetPluginNameStatic(bool is_host);
 
-  const char *GetDescription() override {
-return GetDescriptionStatic(IsHost());
-  }
+  static const char *GetPluginDescriptionStatic(bool is_host);
+
+  ConstString GetPluginName() override;
+
+  uint32_t GetPluginVersion() override { return 1; }
 
   //
   // lldb_private::Platform functions
   //
-  bool GetModuleSpec(const FileSpec &module_file_spec, const ArchSpec &arch,
- ModuleSpec &module_spec) override;
-
-  Error RunShellCommand(const char *command, const FileSpec &working_dir,
-int *status_ptr, int *signo_ptr,
-std::string *command_output,
-uint32_t timeout_sec) override;
-
-  size_t GetSoftwareBreakpointTrapOpcode(Target &target,
- BreakpointSite *bp_site) override;
-
-  bool GetRemoteOSVersion() override;
-
-  bool GetRemoteOSBuildString(std::string &s) override;
-
-  bool GetRemoteOSKernelDescription(std::string &s) override;
-
-  // Remote Platform subclasses need to override this function
-  ArchSpec GetRemoteSystemArchitecture() override;
-
-  bool IsConnected() const override;
-
-  Error ConnectRemote(Args &args) override;
+  const char *GetDescription() override {
+return GetPluginDescriptionStatic(IsHost());
+  }
 
-  Error DisconnectRemote() override;
+  void GetStatus(Stream &strm) override;
 
-  const char *GetHostname() override;
+  bool GetSupportedArchitectureAtIndex(uint32_t idx, ArchSpec &arch) override;
 
-  const char *GetUserName(uint32_t uid) override;
+  bool CanDebugProcess() override;
 
-  const char *GetGroupName(uint32_t gid) override;
+  size_t GetSoftwareBreakpointTrapOpcode(Target &target,
+ BreakpointSite *bp_site) override;
 
   Error LaunchProcess(ProcessLaunchInfo &launch_info) override;
 
   lldb::ProcessSP Attach(ProcessAttachInfo &attach_info, Debugger &debugger,
  Target *target, Error &error) override;
 
-  // FreeBSD processes can not be launched by spawning and attaching.
-  bool CanDebugProcess() override { return false; }
-
-  Error GetSharedModule(const ModuleSpec &module_spec, Process *process,
-lldb::ModuleSP &module_sp,
-const FileSpecList *module_search_paths_ptr,
-lldb::ModuleSP *old_module_sp_ptr,
-bool *did_create_ptr) override;
-
-  bool GetSupportedArchitectureAtIndex(uint32_t idx, ArchSpec &arch) override;
-
-  void GetStatus(Stream &strm) override;
-
   void CalculateTrapHandlerSymbolNames() override;
 
-protected:
-  lldb::PlatformSP m_remote_platform_sp; // Allow multiple ways to connect to a
- // remote freebsd OS
+  uint64_t ConvertMmapFlagsToPlatfo

[Lldb-commits] [PATCH] D159076: [lldb] Add DynamicLoader for FreeBSD Kernel post-mortem debug facility

2023-08-29 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: 
lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp:115-116
+// TODO: If we need to check unknow OS triple like armv7-unknown-unknown?
+// TODO: I don't know if kFreeBSD is a type of FreeBSD and should we accept
+// this Triple? Check the type of kernel
+if (!triple_ref.isOSFreeBSD()) {

kFreeBSD indicates a FreeBSD kernel, typically with some other userland (e.g. 
Debian GNU/kFreeBSD is Debian's standard userland, with FreeBSD instead of 
Linux as the kernel). But these projects are mostly not active anymore and I'm 
not sure how we'd test.



Comment at: 
lldb/source/Plugins/DynamicLoader/FreeBSD-Kernel/DynamicLoaderFreeBSDKernel.cpp:183
+  if (header.getDataEncoding() == llvm::ELF::ELFDATA2MSB) {
+// TODO: swap byte order for big endian
+  }

Add `return false;` for now as well?



Comment at: lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp:943
+  if (header.sh_flags & SHF_ALLOC)
+   return Address(GetSectionList()->FindSectionByID(SectionIndex(I)), 0);
+}

The indentation looks wrong on a few lines here, 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159076/new/

https://reviews.llvm.org/D159076

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D90876: [lldb] [test] Improve comment on expr-after-step-after-crash tests

2021-12-03 Thread Ed Maste via Phabricator via lldb-commits
emaste accepted this revision.
emaste added a comment.

Fine with me, or maybe "A test for Darwin- (and prehaps Windows-)specific 
behavior."


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90876/new/

https://reviews.llvm.org/D90876

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D114967: [lldb] [Process/elf-core] Disable for FreeBSD vmcores

2021-12-03 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp:67
   if (elf_header.Parse(data, &data_offset)) {
+// Check whether we're dealing with a FreeBSD vmcore that needs
+// to be handled via FreeBSDKernel plugin instead.

Maybe "FreeBSD full ELF vmcore" or such? We may have three different FreeBSD 
vmcore formats to deal with
1. kernel-generated ELF dumps (`sysctl debug.minidump=0`)
2. kernel-generated minidumps (`sysctl debug.minidump=1`)
3. minidump post-processed by (a fixed version of) 
https://reviews.freebsd.org/D19253


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114967/new/

https://reviews.llvm.org/D114967

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D90876: [lldb] [test] Improve comment on expr-after-step-after-crash tests

2022-02-15 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

ping


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90876/new/

https://reviews.llvm.org/D90876

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D120485: [lldb][Process/FreeBSD] Add support for address masks on aarch64

2022-02-24 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: 
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp:128
+
+#ifdef NT_ARM_ADDR_MASK
+  if (m_addr_mask_is_valid)

This `#define` is coming from our headers? We need to provide this constant 
within LLVM so this will be available on non-FreeBSD hosts.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120485/new/

https://reviews.llvm.org/D120485

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D120485: [lldb][Process/FreeBSD] Add support for address masks on aarch64

2022-02-24 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

We need to make sure a test covers this as well, perhaps just enabling 
lldb/test/API/functionalities/unwind/aarch64_unwind_pac/TestAArch64UnwindPAC.py?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120485/new/

https://reviews.llvm.org/D120485

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D126615: [lldb] Add an integration test for non-stop protocol

2022-08-16 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Looks reasonable to me


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126615/new/

https://reviews.llvm.org/D126615

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D120485: [lldb][Process/FreeBSD] Add support for address masks on aarch64

2022-03-23 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.
Herald added a project: All.



Comment at: 
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp:128
+
+#ifdef NT_ARM_ADDR_MASK
+  if (m_addr_mask_is_valid)

andrew wrote:
> emaste wrote:
> > This `#define` is coming from our headers? We need to provide this constant 
> > within LLVM so this will be available on non-FreeBSD hosts.
> My understanding is this file is used on FreeBSD as it's used when debugging 
> a currently running process.
Oh yes of course.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120485/new/

https://reviews.llvm.org/D120485

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

2023-03-14 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: lldb/source/Plugins/Process/Utility/FreeBSDSignals.cpp:20
+  // SIGILL
+  AddSignalCode(4, 1 /*ILL_ILLOPC*/, "illegal instruction");
+  AddSignalCode(4, 2 /*ILL_ILLOPN*/, "illegal instruction operand");

FreeBSD comment uses "illegal opcode" fwiw



Comment at: lldb/source/Plugins/Process/Utility/FreeBSDSignals.cpp:29
+
+  // SIGFPE
+  AddSignalCode(8, 1 /*FPE_INTDIV*/, "integer divide by zero");

looks like the first two are swapped?
```
/* codes for SIGFPE */
#define FPE_INTOVF  1   /* Integer overflow.*/
#define FPE_INTDIV  2   /* Integer divide by zero.  */
...
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146044/new/

https://reviews.llvm.org/D146044

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

2023-03-14 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

FreeBSD LGTM


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146044/new/

https://reviews.llvm.org/D146044

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D146222: [lldb] Add compile time checks for signal codes when on the matching platform

2023-03-16 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: lldb/source/Plugins/Process/Utility/FreeBSDSignals.cpp:14-16
+#ifndef SEGV_BNDERR
+#define SEGV_BNDERR 3
+#endif

I'm curious what this is for; we don't use it below?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146222/new/

https://reviews.llvm.org/D146222

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D147300: [lldb] Fix build on older FreeBSD

2023-03-31 Thread Ed Maste via Phabricator via lldb-commits
emaste accepted this revision.
emaste added a comment.

In D147300#4236033 , @dim wrote:

> LGTM, but if such SIGFPE's occur before the FPE_FLTIDO define was introduced, 
> can they ever have value 9?

This is essentially a compile-time assertion to make sure we have the correct 
value for `FPE_FLTIDO`. If we're building on an older FreeBSD which does not 
have it defined then we can't check it anyway.

We could run an LLDB built on older FreeBSD on a newer kernel and receive 
`FPE_FLTIDO` I imagine.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147300/new/

https://reviews.llvm.org/D147300

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D150032: [lldb, NetBSD] getValue => operator* for Optional migration

2023-05-08 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.
Herald added a subscriber: JDevlieghere.

> because Phabricator is a PoS that converts patches to useless diffs

FWIW the Phorge folks have taken an interest in these sorts of complaints 
brought by the FreeBSD community, e.g. https://we.phorge.it/Q46, 
https://we.phorge.it/T15249, https://we.phorge.it/T15096, and 
https://we.phorge.it/T15364


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150032/new/

https://reviews.llvm.org/D150032

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D110545: [lldb] [unittests] Fix building the FreeBSD arm64 Register Context test

2021-09-28 Thread Ed Maste via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG993ada05f5a0: [lldb] [unittests] Fix building the FreeBSD 
arm64 Register Context test (authored by andrew, committed by emaste).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110545/new/

https://reviews.llvm.org/D110545

Files:
  lldb/unittests/Process/Utility/RegisterContextFreeBSDTest.cpp


Index: lldb/unittests/Process/Utility/RegisterContextFreeBSDTest.cpp
===
--- lldb/unittests/Process/Utility/RegisterContextFreeBSDTest.cpp
+++ lldb/unittests/Process/Utility/RegisterContextFreeBSDTest.cpp
@@ -325,8 +325,9 @@
   sizeof(fpreg::fbsd_reg)))
 
 TEST(RegisterContextFreeBSDTest, arm64) {
+  Flags opt_regsets = RegisterInfoPOSIX_arm64::eRegsetMaskDefault;
   ArchSpec arch{"aarch64-unknown-freebsd"};
-  RegisterInfoPOSIX_arm64 reg_ctx{arch};
+  RegisterInfoPOSIX_arm64 reg_ctx{arch, opt_regsets};
 
   EXPECT_GPR_ARM64(x0, x[0]);
   EXPECT_GPR_ARM64(x1, x[1]);


Index: lldb/unittests/Process/Utility/RegisterContextFreeBSDTest.cpp
===
--- lldb/unittests/Process/Utility/RegisterContextFreeBSDTest.cpp
+++ lldb/unittests/Process/Utility/RegisterContextFreeBSDTest.cpp
@@ -325,8 +325,9 @@
   sizeof(fpreg::fbsd_reg)))
 
 TEST(RegisterContextFreeBSDTest, arm64) {
+  Flags opt_regsets = RegisterInfoPOSIX_arm64::eRegsetMaskDefault;
   ArchSpec arch{"aarch64-unknown-freebsd"};
-  RegisterInfoPOSIX_arm64 reg_ctx{arch};
+  RegisterInfoPOSIX_arm64 reg_ctx{arch, opt_regsets};
 
   EXPECT_GPR_ARM64(x0, x[0]);
   EXPECT_GPR_ARM64(x1, x[1]);
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D131075: [lldb] [gdb-remote] Send interrupt packets from async thread

2022-11-17 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

With D131159  and D131160 
 in, where does that leave us wrt this change?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131075/new/

https://reviews.llvm.org/D131075

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D135030: [lldb] [gdb-remote] Abstract sending ^c packet into SendCtrlC() method

2022-11-17 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Maybe we want to call it SendInterrupt? Looks fine to me as a minor tidy-up 
either way.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135030/new/

https://reviews.llvm.org/D135030

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D107475: [lldb] [gdb-remote] Use hexadecimal numbers in vFile packets for GDB compliance

2021-08-04 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

LGTM, although in FreeBSD we don't have any backwards- or cross-compatibility 
issues to worry about.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107475/new/

https://reviews.llvm.org/D107475

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D77241: update eArgTypeScriptLang description to mention lua

2020-04-01 Thread Ed Maste via Phabricator via lldb-commits
emaste created this revision.
emaste added a reviewer: JDevlieghere.

`--script-language python` and `--script-language lua` are now valid

I went with lowercase to match the args


https://reviews.llvm.org/D77241

Files:
  lldb/source/Interpreter/CommandObject.cpp


Index: lldb/source/Interpreter/CommandObject.cpp
===
--- lldb/source/Interpreter/CommandObject.cpp
+++ lldb/source/Interpreter/CommandObject.cpp
@@ -1091,7 +1091,7 @@
 { eArgTypeRunArgs, "run-args", CommandCompletions::eNoCompletion, { 
nullptr, false }, "Arguments to be passed to the target program when it starts 
executing." },
 { eArgTypeRunMode, "run-mode", CommandCompletions::eNoCompletion, { 
nullptr, false }, "Help text goes here." },
 { eArgTypeScriptedCommandSynchronicity, "script-cmd-synchronicity", 
CommandCompletions::eNoCompletion, { nullptr, false }, "The synchronicity to 
use to run scripted commands with regard to LLDB event system." },
-{ eArgTypeScriptLang, "script-language", 
CommandCompletions::eNoCompletion, { nullptr, false }, "The scripting language 
to be used for script-based commands.  Currently only Python is valid." },
+{ eArgTypeScriptLang, "script-language", 
CommandCompletions::eNoCompletion, { nullptr, false }, "The scripting language 
to be used for script-based commands.  python and lua are valid." },
 { eArgTypeSearchWord, "search-word", CommandCompletions::eNoCompletion, { 
nullptr, false }, "Any word of interest for search purposes." },
 { eArgTypeSelector, "selector", CommandCompletions::eNoCompletion, { 
nullptr, false }, "An Objective-C selector name." },
 { eArgTypeSettingIndex, "setting-index", 
CommandCompletions::eNoCompletion, { nullptr, false }, "An index into a 
settings variable that is an array (try 'settings list' to see all the possible 
settings variables and their types)." },


Index: lldb/source/Interpreter/CommandObject.cpp
===
--- lldb/source/Interpreter/CommandObject.cpp
+++ lldb/source/Interpreter/CommandObject.cpp
@@ -1091,7 +1091,7 @@
 { eArgTypeRunArgs, "run-args", CommandCompletions::eNoCompletion, { nullptr, false }, "Arguments to be passed to the target program when it starts executing." },
 { eArgTypeRunMode, "run-mode", CommandCompletions::eNoCompletion, { nullptr, false }, "Help text goes here." },
 { eArgTypeScriptedCommandSynchronicity, "script-cmd-synchronicity", CommandCompletions::eNoCompletion, { nullptr, false }, "The synchronicity to use to run scripted commands with regard to LLDB event system." },
-{ eArgTypeScriptLang, "script-language", CommandCompletions::eNoCompletion, { nullptr, false }, "The scripting language to be used for script-based commands.  Currently only Python is valid." },
+{ eArgTypeScriptLang, "script-language", CommandCompletions::eNoCompletion, { nullptr, false }, "The scripting language to be used for script-based commands.  python and lua are valid." },
 { eArgTypeSearchWord, "search-word", CommandCompletions::eNoCompletion, { nullptr, false }, "Any word of interest for search purposes." },
 { eArgTypeSelector, "selector", CommandCompletions::eNoCompletion, { nullptr, false }, "An Objective-C selector name." },
 { eArgTypeSettingIndex, "setting-index", CommandCompletions::eNoCompletion, { nullptr, false }, "An index into a settings variable that is an array (try 'settings list' to see all the possible settings variables and their types)." },
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D77241: update eArgTypeScriptLang description to mention lua

2020-04-01 Thread Ed Maste via Phabricator via lldb-commits
emaste updated this revision to Diff 254369.
emaste added a comment.

reword


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77241/new/

https://reviews.llvm.org/D77241

Files:
  lldb/source/Interpreter/CommandObject.cpp


Index: lldb/source/Interpreter/CommandObject.cpp
===
--- lldb/source/Interpreter/CommandObject.cpp
+++ lldb/source/Interpreter/CommandObject.cpp
@@ -1091,7 +1091,7 @@
 { eArgTypeRunArgs, "run-args", CommandCompletions::eNoCompletion, { 
nullptr, false }, "Arguments to be passed to the target program when it starts 
executing." },
 { eArgTypeRunMode, "run-mode", CommandCompletions::eNoCompletion, { 
nullptr, false }, "Help text goes here." },
 { eArgTypeScriptedCommandSynchronicity, "script-cmd-synchronicity", 
CommandCompletions::eNoCompletion, { nullptr, false }, "The synchronicity to 
use to run scripted commands with regard to LLDB event system." },
-{ eArgTypeScriptLang, "script-language", 
CommandCompletions::eNoCompletion, { nullptr, false }, "The scripting language 
to be used for script-based commands.  Currently only Python is valid." },
+{ eArgTypeScriptLang, "script-language", 
CommandCompletions::eNoCompletion, { nullptr, false }, "The scripting language 
to be used for script-based commands.  Supported languages are python and lua." 
},
 { eArgTypeSearchWord, "search-word", CommandCompletions::eNoCompletion, { 
nullptr, false }, "Any word of interest for search purposes." },
 { eArgTypeSelector, "selector", CommandCompletions::eNoCompletion, { 
nullptr, false }, "An Objective-C selector name." },
 { eArgTypeSettingIndex, "setting-index", 
CommandCompletions::eNoCompletion, { nullptr, false }, "An index into a 
settings variable that is an array (try 'settings list' to see all the possible 
settings variables and their types)." },


Index: lldb/source/Interpreter/CommandObject.cpp
===
--- lldb/source/Interpreter/CommandObject.cpp
+++ lldb/source/Interpreter/CommandObject.cpp
@@ -1091,7 +1091,7 @@
 { eArgTypeRunArgs, "run-args", CommandCompletions::eNoCompletion, { nullptr, false }, "Arguments to be passed to the target program when it starts executing." },
 { eArgTypeRunMode, "run-mode", CommandCompletions::eNoCompletion, { nullptr, false }, "Help text goes here." },
 { eArgTypeScriptedCommandSynchronicity, "script-cmd-synchronicity", CommandCompletions::eNoCompletion, { nullptr, false }, "The synchronicity to use to run scripted commands with regard to LLDB event system." },
-{ eArgTypeScriptLang, "script-language", CommandCompletions::eNoCompletion, { nullptr, false }, "The scripting language to be used for script-based commands.  Currently only Python is valid." },
+{ eArgTypeScriptLang, "script-language", CommandCompletions::eNoCompletion, { nullptr, false }, "The scripting language to be used for script-based commands.  Supported languages are python and lua." },
 { eArgTypeSearchWord, "search-word", CommandCompletions::eNoCompletion, { nullptr, false }, "Any word of interest for search purposes." },
 { eArgTypeSelector, "selector", CommandCompletions::eNoCompletion, { nullptr, false }, "An Objective-C selector name." },
 { eArgTypeSettingIndex, "setting-index", CommandCompletions::eNoCompletion, { nullptr, false }, "An index into a settings variable that is an array (try 'settings list' to see all the possible settings variables and their types)." },
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D77241: update eArgTypeScriptLang description to mention lua

2020-04-02 Thread Ed Maste via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG55e32e92cda7: [lldb] update eArgTypeScriptLang description 
to mention lua (authored by emaste).
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77241/new/

https://reviews.llvm.org/D77241

Files:
  lldb/source/Interpreter/CommandObject.cpp


Index: lldb/source/Interpreter/CommandObject.cpp
===
--- lldb/source/Interpreter/CommandObject.cpp
+++ lldb/source/Interpreter/CommandObject.cpp
@@ -1091,7 +1091,7 @@
 { eArgTypeRunArgs, "run-args", CommandCompletions::eNoCompletion, { 
nullptr, false }, "Arguments to be passed to the target program when it starts 
executing." },
 { eArgTypeRunMode, "run-mode", CommandCompletions::eNoCompletion, { 
nullptr, false }, "Help text goes here." },
 { eArgTypeScriptedCommandSynchronicity, "script-cmd-synchronicity", 
CommandCompletions::eNoCompletion, { nullptr, false }, "The synchronicity to 
use to run scripted commands with regard to LLDB event system." },
-{ eArgTypeScriptLang, "script-language", 
CommandCompletions::eNoCompletion, { nullptr, false }, "The scripting language 
to be used for script-based commands.  Currently only Python is valid." },
+{ eArgTypeScriptLang, "script-language", 
CommandCompletions::eNoCompletion, { nullptr, false }, "The scripting language 
to be used for script-based commands.  Supported languages are python and lua." 
},
 { eArgTypeSearchWord, "search-word", CommandCompletions::eNoCompletion, { 
nullptr, false }, "Any word of interest for search purposes." },
 { eArgTypeSelector, "selector", CommandCompletions::eNoCompletion, { 
nullptr, false }, "An Objective-C selector name." },
 { eArgTypeSettingIndex, "setting-index", 
CommandCompletions::eNoCompletion, { nullptr, false }, "An index into a 
settings variable that is an array (try 'settings list' to see all the possible 
settings variables and their types)." },


Index: lldb/source/Interpreter/CommandObject.cpp
===
--- lldb/source/Interpreter/CommandObject.cpp
+++ lldb/source/Interpreter/CommandObject.cpp
@@ -1091,7 +1091,7 @@
 { eArgTypeRunArgs, "run-args", CommandCompletions::eNoCompletion, { nullptr, false }, "Arguments to be passed to the target program when it starts executing." },
 { eArgTypeRunMode, "run-mode", CommandCompletions::eNoCompletion, { nullptr, false }, "Help text goes here." },
 { eArgTypeScriptedCommandSynchronicity, "script-cmd-synchronicity", CommandCompletions::eNoCompletion, { nullptr, false }, "The synchronicity to use to run scripted commands with regard to LLDB event system." },
-{ eArgTypeScriptLang, "script-language", CommandCompletions::eNoCompletion, { nullptr, false }, "The scripting language to be used for script-based commands.  Currently only Python is valid." },
+{ eArgTypeScriptLang, "script-language", CommandCompletions::eNoCompletion, { nullptr, false }, "The scripting language to be used for script-based commands.  Supported languages are python and lua." },
 { eArgTypeSearchWord, "search-word", CommandCompletions::eNoCompletion, { nullptr, false }, "Any word of interest for search purposes." },
 { eArgTypeSelector, "selector", CommandCompletions::eNoCompletion, { nullptr, false }, "An Objective-C selector name." },
 { eArgTypeSettingIndex, "setting-index", CommandCompletions::eNoCompletion, { nullptr, false }, "An index into a settings variable that is an array (try 'settings list' to see all the possible settings variables and their types)." },
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D96555: [lldb] Remove the legacy FreeBSD plugin

2021-02-14 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Not sure if you're missing something, but removing the old plugin LGTM




Comment at: lldb/tools/lldb-server/CMakeLists.txt:13
 if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
-  list(APPEND LLDB_PLUGINS
-lldbPluginProcessFreeBSDRemote
-lldbPluginProcessFreeBSD)
+  list(APPEND LLDB_PLUGINS lldbPluginProcessFreeBSDRemote)
 endif()

Should we rename this after?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96555/new/

https://reviews.llvm.org/D96555

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D96555: [lldb] Remove the legacy FreeBSD plugin

2021-02-14 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: lldb/tools/lldb-server/CMakeLists.txt:13
 if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
-  list(APPEND LLDB_PLUGINS
-lldbPluginProcessFreeBSDRemote
-lldbPluginProcessFreeBSD)
+  list(APPEND LLDB_PLUGINS lldbPluginProcessFreeBSDRemote)
 endif()

emaste wrote:
> Should we rename this after?
Ah I see D96557


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96555/new/

https://reviews.llvm.org/D96555

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D97114: [lldb] [docs] Update platform support status

2021-02-20 Thread Ed Maste via Phabricator via lldb-commits
emaste accepted this revision.
emaste added a comment.
This revision is now accepted and ready to land.

FreeBSD changes LGTM


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97114/new/

https://reviews.llvm.org/D97114

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D97230: [lldb] [test] Workaround symlink-related test failures

2021-02-24 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

I think it's valuable to avoid testing this (symlink issue) as a side effect of 
these test cases, but we should have an explicit test for this; it is an issue 
users could hit.

Do you know if this is a bug specific to lldb's FreeBSD code (or do we just 
have a default symlink in the paths used here where other OS's don/t)?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97230/new/

https://reviews.llvm.org/D97230

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D96548: [lldb] [Process/FreeBSDRemote] Introduce aarch64 hw break/watchpoint support

2021-02-24 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

> I don't think it's very likely. @emaste, any opinion on this?

I think it is fine to make this conditional on version. We are working on 
bringing arm64 to Tier-1 status in FreeBSD 13 (which will have the referenced 
kernel changes) and we can assume that as a minimum version for host and target.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96548/new/

https://reviews.llvm.org/D96548

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D97210: [lldb] Rename NativeRegisterContext{Watchpoint => DBReg}_x86

2021-02-24 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

No objection from me


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97210/new/

https://reviews.llvm.org/D97210

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D97230: [lldb] [test] Workaround symlink-related test failures

2021-02-24 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

OK; I think this change is reasonable, I just want to make sure we don't 
completely lose the underlying issue.

Let's make sure that we at least have a bug report to track it (i.e., let's not 
close llvm.org/pr48376 and llvm.org/pr48421 with "no longer fails" without 
having a new bug for this problem)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97230/new/

https://reviews.llvm.org/D97230

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D101086: [lldb] [Process/elf-core] Fix reading FPRs from FreeBSD/i386 cores

2021-05-11 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

LGTM


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101086/new/

https://reviews.llvm.org/D101086

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D101893: [Process/elf-core] Read PID from FreeBSD prpsinfo

2021-05-11 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

LGTM


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101893/new/

https://reviews.llvm.org/D101893

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D88453: [lldb] Fix FreeBSD Arm Process Plugin build.

2020-09-30 Thread Ed Maste via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf794160c6cb7: [lldb] Fix FreeBSD Arm Process Plugin build 
(authored by emaste).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88453/new/

https://reviews.llvm.org/D88453

Files:
  lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp
  lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h


Index: 
lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h
===
--- lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h
+++ lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h
@@ -70,6 +70,10 @@
   uint32_t NumSupportedHardwareWatchpoints();
 
 private:
+  RegisterInfoPOSIX_arm::GPR m_gpr_arm;
+
+  RegisterInfoPOSIX_arm::FPU m_fpr;
+
   ProcessMonitor &GetMonitor();
 };
 
Index: 
lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp
===
--- 
lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp
+++ 
lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp
@@ -14,6 +14,7 @@
 #include "ProcessMonitor.h"
 #include "RegisterContextPOSIXProcessMonitor_arm.h"
 #include "Plugins/Process/Utility/RegisterContextPOSIX_arm.h"
+#include "Plugins/Process/Utility/lldb-arm-register-enums.h"
 
 using namespace lldb_private;
 using namespace lldb;


Index: lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h
===
--- lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h
+++ lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h
@@ -70,6 +70,10 @@
   uint32_t NumSupportedHardwareWatchpoints();
 
 private:
+  RegisterInfoPOSIX_arm::GPR m_gpr_arm;
+
+  RegisterInfoPOSIX_arm::FPU m_fpr;
+
   ProcessMonitor &GetMonitor();
 };
 
Index: lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp
===
--- lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp
+++ lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp
@@ -14,6 +14,7 @@
 #include "ProcessMonitor.h"
 #include "RegisterContextPOSIXProcessMonitor_arm.h"
 #include "Plugins/Process/Utility/RegisterContextPOSIX_arm.h"
+#include "Plugins/Process/Utility/lldb-arm-register-enums.h"
 
 using namespace lldb_private;
 using namespace lldb;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D89193: [lldb] [Process/FreeBSDRemote] Support YMM reg via PT_*XSTATE

2020-10-13 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Looks OK




Comment at: 
lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp:448-449
+
+assert(info.xsave_mask & XFEATURE_ENABLED_X87);
+assert(info.xsave_mask & XFEATURE_ENABLED_SSE);
+

I wonder if these should be an error rather than assertion?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89193/new/

https://reviews.llvm.org/D89193

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D89193: [lldb] [Process/FreeBSDRemote] Support YMM reg via PT_*XSTATE

2020-10-13 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: 
lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp:448-449
+
+assert(info.xsave_mask & XFEATURE_ENABLED_X87);
+assert(info.xsave_mask & XFEATURE_ENABLED_SSE);
+

mgorny wrote:
> mgorny wrote:
> > emaste wrote:
> > > I wonder if these should be an error rather than assertion?
> > I suppose the question is if they ever happen in real use. If they do, we 
> > should probably handle them gracefully. Otherwise, assertion should be 
> > sufficient.
> I can actually answer the first question myself. According to Intel's manual, 
> it is impossible to disable x87 bit. IIRC attempt to unset it on XCR0 will 
> raise some fault.
> 
> The second question is basically whether under any circumstances can FreeBSD 
> kernel disable SSE on XCR0 (this code is only used on systems supporting 
> XSAVE).
I guess my point is that having these bits unset would indicate a kernel issue 
or bug, or maybe hardware issue, but never indicate an error or invalid 
operation in lldb itself.

Either way I think there is no practical impact, it's not actually going to 
happen.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89193/new/

https://reviews.llvm.org/D89193

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D89248: [lldb] [test/Register] Add read/write tests for multithreaded process

2020-10-13 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Looks reasonable to me and currently fails (as expected) on FreeBSD.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89248/new/

https://reviews.llvm.org/D89248

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D89413: [lldb] [Process/FreeBSDRemote] Initial multithreading support

2020-10-15 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Looks fine to me


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89413/new/

https://reviews.llvm.org/D89413

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D89859: Remove .svn from exclude list as we moved to git

2020-10-21 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

LGTM


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89859/new/

https://reviews.llvm.org/D89859

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D90454: [lldb] [Host/{free, net}bsd] Fix process matching by name

2020-10-30 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

There is TestProcessAttach.py that has an @expectedFailureNetBSD but no FreeBSD 
annotation, as well as TestCompletion.py, but I don't see these in the failing 
list.

`process attach -n foo` does fail for me on FreeBSD


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90454/new/

https://reviews.llvm.org/D90454

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D90757: [lldb] Enable FreeBSDRemote plugin by default and update test status

2020-11-04 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

I added comments in the now-dereferenced bugs linking back to this review - 
most of them were submitted by me, and I'll double check and close them once 
this lands.

One minor update needed (restoring a comment that was partially deleted)




Comment at: lldb/packages/Python/lldbsuite/test/dotest.py:955
 
-# Don't do lldb-server (llgs) tests on anything except Linux and Windows.
+# Don't do lldb-server (llgs) tests on platforms not supporting it.
 configuration.dont_do_llgs_test = not (

It's a shame that these variables and the comments are inverted sense / double 
negatives, but not an issue in this patch.



Comment at: 
lldb/test/API/commands/register/register/register_command/TestRegisters.py:31
 @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
-@expectedFailureNetBSD
+@expectedFailureAll(oslist=["freebsd", "netbsd"])
 def test_register_commands(self):

there's no (existing) PR for the failure?



Comment at: 
lldb/test/API/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py:25
 
+@expectedFailureAll(oslist=["freebsd"])
 def test_watchpoint_after_thread_start(self):

was this one already failing, or is this new?



Comment at: lldb/test/API/functionalities/exec/TestExec.py:23
 @skipIfAsan # rdar://problem/43756823
+@skipIfFreeBSD  # hangs
 @skipIfWindows

So hangs on FreeBSD but reliably fails on NetBSD?





Comment at: 
lldb/test/API/functionalities/thread/create_after_attach/TestCreateAfterAttach.py:25
 
-@skipIfFreeBSD  # Hangs.  May be the same as Linux issue llvm.org/pr16229 
but
 # not yet investigated.  Revisit once required functionality
 # is implemented for FreeBSD.

part of comment here disappeared


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90757/new/

https://reviews.llvm.org/D90757

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D90757: [lldb] Enable FreeBSDRemote plugin by default and update test status

2020-11-04 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

When running locally with this change applied I get:

  
  Failed Tests (8):
lldb-api :: 
commands/expression/multiline-completion/TestMultilineCompletion.py
lldb-api :: 
functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py
lldb-api :: 
functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointThreads.py
lldb-api :: iohandler/completion/TestIOHandlerCompletion.py
lldb-api :: python_api/watchpoint/watchlocation/TestSetWatchlocation.py
lldb-api :: python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
lldb-api :: tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
lldb-unit :: 
tools/lldb-server/tests/./LLDBServerTests/StandardStartupTest.TestStopReplyContainsThreadPcs
  
  
  Unexpectedly Passed Tests (2):
lldb-api :: api/multiple-debuggers/TestMultipleDebuggers.py
lldb-api :: lang/c/conflicting-symbol/TestConflictingSymbol.py
  
  
  Testing Time: 367.34s
Unsupported:  422
Passed : 1741
Expectedly Failed  :5
Failed :8
Unexpectedly Passed:2


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90757/new/

https://reviews.llvm.org/D90757

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D90757: [lldb] Enable FreeBSDRemote plugin by default and update test status

2020-11-05 Thread Ed Maste via Phabricator via lldb-commits
emaste accepted this revision.
emaste added a comment.

> What do you suggest? Is it fine to go with my results for as long as I work 
> on it? I can update it to match CI/buildbot results later.

Yes absolutely. I pasted my results mainly as an FYI/for comparison, since I 
recall there were many intermittent or flaky tests. I definitely want to see 
this go in and we can iterate on the individual annotations.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90757/new/

https://reviews.llvm.org/D90757

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D90757: [lldb] Enable FreeBSDRemote plugin by default and update test status

2020-11-05 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: lldb/packages/Python/lldbsuite/test/dotest.py:955
 
-# Don't do lldb-server (llgs) tests on anything except Linux and Windows.
+# Don't do lldb-server (llgs) tests on platforms not supporting it.
 configuration.dont_do_llgs_test = not (

mgorny wrote:
> emaste wrote:
> > It's a shame that these variables and the comments are inverted sense / 
> > double negatives, but not an issue in this patch.
> Yes, I had to look at it for a while to make sure I'm doing it right. I'll 
> change them in a followup commit.
Thanks.



Comment at: 
lldb/test/API/commands/register/register/register_command/TestRegisters.py:31
 @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
-@expectedFailureNetBSD
+@expectedFailureAll(oslist=["freebsd", "netbsd"])
 def test_register_commands(self):

mgorny wrote:
> emaste wrote:
> > there's no (existing) PR for the failure?
> No. I'm planning to file bugs during the next stage, after trying to fix the 
> trivial ones, if that's ok with you.
Yes absolutely. I was just curious because this was already failing for NetBSD



Comment at: 
lldb/test/API/functionalities/inferior-crashing/TestInferiorCrashingStep.py:54-55
 # intended IMHO.
 @skipIfLinux
-@skipIfFreeBSD
-@expectedFailureNetBSD
+@expectedFailureAll(oslist=["freebsd", "netbsd"])
 def test_inferior_crashing_expr_step_and_expr(self):

labath wrote:
> I'm pretty sure the root cause here is the same for net/free bsd as it is for 
> linux (it comes down to macos catching the "crashes" specially, before they 
> even get turned to a SEGV -- something that's not possible elsewhere). I 
> marked it skip because that's not something we should support, ever. I don't 
> care that much which decorator (skip vs. xfail) is used here, but I think 
> they should be consistent.
Sounds reasonable, we may want to change the comment above to make it clear 
this is an explicit decision.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90757/new/

https://reviews.llvm.org/D90757

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D90863: [lldb] [Process/FreeBSDRemote] Remove thread name caching

2020-11-05 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Does Linux fetch each time also?
I agree it's probably not worth the effort.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90863/new/

https://reviews.llvm.org/D90863

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D90876: [lldb] [test] Improve comment on expr-after-step-after-crash tests

2020-11-05 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

How does Windows fit into this? Other than that Q, LGTM.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90876/new/

https://reviews.llvm.org/D90876

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D91003: [lldb] [test] Use skipUnlessDarwin for tests specific to Darwin

2020-11-07 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

> In theory Obj-C is available on other systems

Yes, in particular it should be possible on FreeBSD. I agree that an 
Obj-C-specific decorator would be best but it's a very low priority.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91003/new/

https://reviews.llvm.org/D91003

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D91076: [lldb] [Process/FreeBSDRemote] Correct DS/ES/FS/GS register sizes

2020-11-09 Thread Ed Maste via Phabricator via lldb-commits
emaste accepted this revision.
emaste added a comment.
This revision is now accepted and ready to land.

Agree that even if refactoring is needed correcting these makes sense.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91076/new/

https://reviews.llvm.org/D91076

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D91065: [lldb] [test] Rename '.categories' to 'categories'

2020-11-09 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

No objection from me but I haven't been sufficiently involved in lldb's tests 
to approve.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91065/new/

https://reviews.llvm.org/D91065

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D91645: [lldb] [test] Un-XFAIL tests on freebsd/i386

2020-11-17 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: lldb/test/API/functionalities/exec/TestExec.py:19
 
-@expectedFailureAll(archs=['i386'], bugnumber="rdar://28656532")
+@expectedFailureAll(archs=['i386'],
+oslist=no_match(["freebsd"]),

Interesting, so FreeBSD is now the only OS where this test passes on i386?

Of course rdar://28656532 is opaque, would be nice if Apple folks can provide 
some insight on this.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91645/new/

https://reviews.llvm.org/D91645

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D91645: [lldb] [test] Un-XFAIL tests on freebsd/i386

2020-11-18 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: lldb/test/API/functionalities/exec/TestExec.py:19
 
-@expectedFailureAll(archs=['i386'], bugnumber="rdar://28656532")
+@expectedFailureAll(archs=['i386'],
+oslist=no_match(["freebsd"]),

labath wrote:
> labath wrote:
> > mgorny wrote:
> > > emaste wrote:
> > > > Interesting, so FreeBSD is now the only OS where this test passes on 
> > > > i386?
> > > > 
> > > > Of course rdar://28656532 is opaque, would be nice if Apple folks can 
> > > > provide some insight on this.
> > > I suspect others might pass too and this is a Darwin-specific issue but I 
> > > don't have 32-bit NetBSD install handy at the moment, and LLDB doesn't 
> > > seem to work at all on Arch Linux 32 for some obscure reason.
> > I was actually running the test on a 64-bit multilib system. It's possible 
> > that a pure 32-bit system behaves differently.
> (or just a 32-bit build of lldb)
Ah, fair point. I'm not all that interested in FreeBSD/i386 tbh, it just seemed 
surprising.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91645/new/

https://reviews.llvm.org/D91645

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D91810: [lldb] [Process/FreeBSD] Fix 'process connect' plugin choice

2020-11-19 Thread Ed Maste via Phabricator via lldb-commits
emaste accepted this revision.
emaste added a comment.
This revision is now accepted and ready to land.

Looks ok to me


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91810/new/

https://reviews.llvm.org/D91810

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D92314: [lldb] [Process/FreeBSDRemote] Implement GetLoadedModuleFileSpec() and GetFileLoadAddress()

2020-11-30 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

No objection, but maybe add a comment explaining the status of this 
implementation? Does/will NetBSD do the same?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92314/new/

https://reviews.llvm.org/D92314

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D92187: [lldb] [FreeBSD] Fix establishing DT_NEEDED libraries from dyld

2020-11-30 Thread Ed Maste via Phabricator via lldb-commits
emaste added a subscriber: bsdjhb.
emaste added a comment.

I'm curious how gdb handles this, and asked @bsdjhb if he knows off hand.

Is there a brief description of how this works on Linux and/or NetBSD?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92187/new/

https://reviews.llvm.org/D92187

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D92187: [lldb] [FreeBSD] Fix establishing DT_NEEDED libraries from dyld

2020-11-30 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Link to Linux info:
https://sourceware.org/gdb/wiki/LinkerInterface


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92187/new/

https://reviews.llvm.org/D92187

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D92187: [lldb] [FreeBSD] Fix establishing DT_NEEDED libraries from dyld

2020-11-30 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

> One thing that FreeBSD should do, is to upgrade to the protocol version 1 
> (stored in r_version), like Linux, NetBSD and OpenBSD.

It looks like Linux has always used r_version=1 (since 1995).

AFAICT we can just add r_ldbase and set version to 1.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92187/new/

https://reviews.llvm.org/D92187

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D92187: [lldb] [FreeBSD] Fix establishing DT_NEEDED libraries from dyld

2020-11-30 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

> One thing that FreeBSD should do, is to upgrade to the protocol version 1 
> (stored in r_version), like Linux, NetBSD and OpenBSD.

It looks like Linux has always used r_version=1 (since 1995).

AFAICT we can just add r_ldbase and set version to 1.
See https://reviews.freebsd.org/D27429


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92187/new/

https://reviews.llvm.org/D92187

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D92667: [lldb] [Platform/POSIX] Use gdb-remote plugin when attaching

2020-12-04 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

No objection here. I'm curious why the two modified tests work on Linux or 
NetBSD today though?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92667/new/

https://reviews.llvm.org/D92667

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D92667: [lldb] [Platform/POSIX] Use gdb-remote plugin when attaching

2020-12-04 Thread Ed Maste via Phabricator via lldb-commits
emaste accepted this revision.
emaste added a comment.
This revision is now accepted and ready to land.

Ah, of course. SGTM.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92667/new/

https://reviews.llvm.org/D92667

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D92264: [lldb] [POSIX-DYLD] Update the cached exe path after attach

2020-12-06 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

Seems reasonable to me


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92264/new/

https://reviews.llvm.org/D92264

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D93495: CrashReason: Add MTE tag check faults to the list of crash reasons.

2020-12-27 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: lldb/source/Plugins/Process/POSIX/CrashReason.cpp:62
+#ifndef SEGV_MTEAERR
+#define SEGV_MTEAERR 8
+#endif

This should perhaps include an `#ifdef LINUX`(sp?) somehow, since 8 and 9 are 
not necessarily MTEAERR / MTESERR on all POSIXy systems (although that said I'm 
planning to reserve 8 and 9 on FreeBSD to match).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93495/new/

https://reviews.llvm.org/D93495

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D93495: CrashReason: Add MTE tag check faults to the list of crash reasons.

2020-12-27 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: lldb/source/Plugins/Process/POSIX/CrashReason.cpp:62
+#ifndef SEGV_MTEAERR
+#define SEGV_MTEAERR 8
+#endif

emaste wrote:
> This should perhaps include an `#ifdef LINUX`(sp?) somehow, since 8 and 9 are 
> not necessarily MTEAERR / MTESERR on all POSIXy systems (although that said 
> I'm planning to reserve 8 and 9 on FreeBSD to match).
(https://reviews.freebsd.org/D27785)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93495/new/

https://reviews.llvm.org/D93495

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D93495: CrashReason: Add MTE tag check faults to the list of crash reasons.

2020-12-31 Thread Ed Maste via Phabricator via lldb-commits
emaste added inline comments.



Comment at: lldb/source/Plugins/Process/POSIX/CrashReason.cpp:62
+#ifndef SEGV_MTEAERR
+#define SEGV_MTEAERR 8
+#endif

pcc wrote:
> emaste wrote:
> > emaste wrote:
> > > This should perhaps include an `#ifdef LINUX`(sp?) somehow, since 8 and 9 
> > > are not necessarily MTEAERR / MTESERR on all POSIXy systems (although 
> > > that said I'm planning to reserve 8 and 9 on FreeBSD to match).
> > (https://reviews.freebsd.org/D27785)
> Makes sense, done.
> 
> For now I left SEGV_BNDERR as is, although it doesn't appear that any of 
> FreeBSD, OpenBSD, NetBSD, illumos or XNU have defined anything besides 
> SEGV_MAPERR and SEGV_ACCERR so it might be good to put SEGV_BNDERR under the 
> #ifdef as well.
What do you think about

```
#ifdef __linux__
#ifndef SEGV_MTEAERR
#define SEGV_MTEAERR 8
#endif

#ifdef SEGV_MTEAERR
  case SEGV_MTEAERR:
return CrashReason::eAsyncTagCheckFault;
#endif
```

We're likely to have `SEGV_MTEAERR` in FreeBSD soon


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93495/new/

https://reviews.llvm.org/D93495

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D95297: [lldb] [Process/FreeBSDRemote] Introduce arm64 support

2021-01-30 Thread Ed Maste via Phabricator via lldb-commits
emaste added a comment.

In D95297#2532026 , @mgorny wrote:

> lldb-server. We're aiming towards removing the native plug-in soon.

To add a little background, the FreeBSD Foundation is funding this effort to 
move all FreeBSD targets to lldb-server; amd64 and arm64 are our primary 
targets of interest while other supported FreeBSD architectures (32-bit arm, 
32- and 64-bit mips, 32- and 64-bit powerpc, 64-bit risc-v) are intended to be 
handled on a best-effort basis, depending in part on whether FreeBSD folks with 
an interest in those platforms are available to help test.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95297/new/

https://reviews.llvm.org/D95297

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


  1   2   >