[all-commits] [llvm/llvm-project] ac0dda: [lldb] add stop-at-user-entry option to process la...

José Lira Junior via All-commits all-commits at lists.llvm.org
Mon Oct 9 16:44:13 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ac0dda894231e6281e7739aa0ea01a4e9697c747
      https://github.com/llvm/llvm-project/commit/ac0dda894231e6281e7739aa0ea01a4e9697c747
  Author: José Lira Junior <jljuniorpb at gmail.com>
  Date:   2023-10-09 (Mon, 09 Oct 2023)

  Changed paths:
    M lldb/include/lldb/Target/Language.h
    M lldb/include/lldb/Target/Target.h
    M lldb/source/Commands/CommandOptionsProcessLaunch.cpp
    M lldb/source/Commands/Options.td
    M lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
    M lldb/source/Plugins/Language/ObjC/ObjCLanguage.h
    M lldb/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h
    M lldb/source/Target/Target.cpp
    A lldb/test/Shell/Commands/command-process-launch-user-entry.test

  Log Message:
  -----------
  [lldb] add stop-at-user-entry option to process launch (#67019)

## Description
This pull request adds a new `stop-at-user-entry` option to LLDB
`process launch` command, allowing users to launch a process and pause
execution at the entry point of the program (for C-based languages,
`main` function).

## Motivation
This option provides a convenient way to begin debugging a program by
launching it and breaking at the desired entry point.

## Changes Made
- Added `stop-at-user-entry` option to `Options.td` and the
corresponding case in `CommandOptionsProcessLaunch.cpp` (short option is
'm')
- Implemented `GetUserEntryPointName` method in the Language plugins
available at the moment.
- Declared the `CreateBreakpointAtUserEntry` method in the Target API.
- Create Shell test for the command
`command-process-launch-user-entry.test`.

## Usage
`process launch --stop-at-user-entry` or `process launch -m` launches
the process and pauses execution at the entry point of the program.




More information about the All-commits mailing list