Debugging a Program With dbx

Case 1

In Case 1, you can use rtc_patch_area to make one or more object files to serve as patch areas and link them into the a.out.After you have seen a message like the following:


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

  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 6490432
    

    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 the a.out, adding the patch.o files to the link line.

  4. Try RTC again with the new binary.

    If RTC still fails, you may try to reposition the patch.o files on the link line.

An alternate workaround is to divide the a.out into a smaller a.out and shared libraries.