Debugging a Program With dbx

Case 2

If you are running RTC on an attached process, see case 2a. Otherwise, the only workaround is to rebuild the shared library with extra patch space:

After you have seen a message like the following::


Enabling Error Checking... dbx: warning: rtc: cannot find patch space within 8Mb (need 563332 bytes for ./sh1.so)
dbx: patch area too far (8Mb limitation); Access checking disabled
         (See `help rtc8M', case 2)

  1. Create an object file patch.o for a patch area with a size less than or equal to 8 megabytes:


    rtc_patch_area -o patch.o -size 563332
    

    The -size flag is optional; the default value is 8000000.

  2. If the size request from the error message is satisfied, continue to the next step. Otherwise, repeat step 1 and create more .o files as needed.

  3. Relink sh1.so, adding the patch.o files to the link line.

  4. Try RTC again with the new binary; if dbx requests patch space for another shared library, repeat steps 1-3 for that library.