Bug 12648 - Incorrect check of exec before offering symbol lookup to remote
Summary: Incorrect check of exec before offering symbol lookup to remote
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: remote (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-07 07:22 UTC by Evan
Modified: 2013-03-13 05:56 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evan 2011-04-07 07:22:54 UTC
Remote targets do not require an exec file, since they can be already executing.
They can however have a symbol file loaded, and if symbols are loaded, then they should be offered to the remote target at the time of connection.

Currently there is a check against "exec_bfd" on gdb/remote.c:3353 :

    if (exec_bfd)    /* No use without an exec file.  */
        remote_check_symbols (symfile_objfile);


This causes remote targets with no exec file but with a symbol file to never be offered symbol lookups.

To reproduce the lack of symbol offer, I can perform the following steps:

Start OpenOCD.
arm-none-eabi-gdb
>symbol-file <symbols.elf>
>target remote localhost:3333

I have commented out the line with if statement, leaving the remote_check_symbols call to always happen, and symbols are offered correctly, but am not sure if there are circumstances where this is incorrect.

The reason this bug is important, is that Eclipse CDT uses this method for connecting to a remote target, and if symbols are not offered, then the RTOS cannot be detected.

Regards,

Evan Hunter