This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, I have an issue that will eventually come up in regards to starting GDB from a front end. Choosing the correct interpreter that GDB supports could be potentially non trivial, requiring several starts of GDB. Currently, for each version of mi that the FE supports, it will have to start GDB to see if it supports that version of the protocol. As the list of MI protocol versions get's longer, this action get's longer and longer. It would be good to solve this problem as early as possible for obvious reasons. Attached below is a patch that modified GDB so that it can accept the -i flag as a comma sepearated list like shown below: $ ./gdb/gdb -q -i=mi ./main ~"Using host libthread_db library \"/lib/tls/i686/cmov/libthread_db.so.1\".\n" (gdb) $ ./gdb/gdb -q -i=mi4,mi3 ./main mi_protocol_version=mi3 ~"Using host libthread_db library \"/lib/tls/i686/cmov/libthread_db.so.1\".\n" (gdb) This will allow the FE to start GDB 1 time and to determine which version of the protocol GDB was compatible with. If you have multiple interpreter choices on the -i switch, then GDB will output the first line it writes as mi_protocol_version=miN where miN will be the version GDB is going to communicate with. This change is backwards compatible because users were not able in the past to have a comma separated list in the -i flag. How does this look? Thanks, Bob Rossi
Attachment:
mi_protocol_ver.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |