Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8244207

Simplify usage of Compile::print_method() when debugging with gdb and enable its use with rr

    XMLWordPrintable

Details

    • b23

    Backports

      Description

        When debugging with gdb, one can use

        (gdb) call C->print_method(PHASE_FAILURE, 0, 0)

        to print the current method. This, however, requires that all flags for enabling the Ideal Graph Visualizer to print methods in general are set. Moreover, if C is not defined one must either go up the stack or use:

        (gdb) call Compile::current()->print_method(PHASE_FAILURE, 0, 0)

        which is tedious. This could be simplified with a debug method such that we only need to call with an optional custom phase name:

        (gdb) call print_method(phase_name)


        The above gdb calls do not work when debugging with rr [1]. This RFE should also provide a possibility to print methods on the fly while stepping through the code with rr.

        [1] https://rr-project.org/

        Attachments

          Issue Links

            Activity

              People

                chagedorn Christian Hagedorn
                chagedorn Christian Hagedorn
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: