The branch, mmetzger/btrace has been updated discards b9726ca4867ba8cea4f945aebae4c3ad2e2e2889 (commit) discards 5dd7aa460b03c158b938fa76ff6c83927d597bd8 (commit) discards 25be2d9660d4357cf0d08c52fd96f8df29d389b0 (commit) discards 9bd06db6df3084f844955c0b1c839bfad0abd9b8 (commit) discards 86c07aaddf5f8e16baf0674c58df9218a6754706 (commit) discards 204dbf91e3accdb741a90d00ed0833bb41457210 (commit) discards 8a517642fcad89f7673aa65031cc099fbaee1ab8 (commit) discards 198f9c336b648c1f07f92d20e0827aee7c2872a5 (commit) discards 976c314aaf00f2f419657165cd1af4de494d4ec2 (commit) discards 9806aa1576781a4d9b2b6e291c8a0538419cd303 (commit) discards 186d1211411391f602a8e5774bdd402a69b94d72 (commit) discards dfb79bd0e88cc693ac526ee9109debbb771a844e (commit) discards 35daa5fa3c2e8b4a51f7d63f84a572d3ab973f75 (commit) discards 5eff8d6f18ec211552c95d0635ad61447145f43f (commit) discards 4f927526673402d7a7bf763db245f5cb4009152f (commit) discards 00ec02080ada82d56f960e639811a52a22d6de2e (commit) discards 830c24801bb33775c5522b92f60df14a0eb5e684 (commit) discards 2d0fa1b8d94fe9fdda1e3dea5854a4488e7fe6e5 (commit) discards 7244ad83b39046ee8053aca0c29f186ae174739a (commit) discards eb62d133bb89ab45d14d142c01e23daa17acb584 (commit) discards 1ac0a20e2b406c17ac97077349ebd5657d2983d5 (commit) discards 6be537e611bea6b0663680b155203e665fad0217 (commit) discards 0f04a9204109ae0d190080da079811c79672c181 (commit) discards 641318f3b4f9e762955f30aca021453f9f0e0c11 (commit) discards 9fba3d4556ef5243cae18a434afabb7552c3463e (commit) discards 805594fecb09865c68dbc8d95730216aa8106a66 (commit) discards 1479e816769e6ac8c9b9c9d4da34268090a12223 (commit) via a80f274ca6274b73a64a8ffbb984fbfc6cbf5bdb (commit) via 6c823d270fb821a5a95188150b22a711891a0acd (commit) via 0167c99b648522bfc98fb54cac0012055edb0061 (commit) via 957809051c81f6cdc012f1782b62353bfa91bc37 (commit) via c8dc3d4eba117a44c4657409ea0f98387acaceed (commit) via 7046884d77037e293cf2bf4a41ee07d5dfdd39ca (commit) via 8558e0fdf4c3d23e905167100e2fa11858f421d5 (commit) via a4a8c198b80d1cd1fda5f9bf2f187136355b6c6f (commit) via f30b575df2f78f0fbfaa39a46b5163ac54240ec6 (commit) via 27ebbd20ff46ff14f57f319a49c22dfdf0aac833 (commit) via 73838e1682809e3cd74caf88e49ab6456500afae (commit) via 7e8327d1c0bc60ddd88065cfb1f7aa6246bc10a9 (commit) via eccc532539169b381c27f8917f4d21380fd41c1e (commit) via 45366ec40931a0658aa2962231b93eb8079f6611 (commit) via c7b04a6fd212638b7f836520c7f5bd32e96827da (commit) via 7649df3241d295ebd368cf6aefb0b6cb17c9807c (commit) via 399bd92c935f580ff4ca794aa77b7d27a76018db (commit) via b05c304077ca43b74d8d3b62136b3f66fbb587e0 (commit) via de28e6d251107268f0867830eb040cc5e1476876 (commit) via 4b6d9c5b65d617cc9297975522d8bc0f8dc889bd (commit) via 084fd13fd75b3e452818383bc4cd8533b32ac9a3 (commit) via 61ea5d208bafd661f52b7db0d43cd2655741987f (commit) via 53d2625aa5606dfd19ba3806eebeda54ce159f09 (commit) via c383fc030120a3e092381dda26a7e5d3999b9fee (commit) via 3255f72c09abc5fa6fba404460b68908158044b5 (commit) via 2954f54136e2d338b294b1ac033dff7826caf73f (commit) via 2b1bc98105f6eb99b045645642216ce9d45153c7 (commit) via 03a29636e9c8396fffddb01febb42c948cd92b20 (commit) via 4f4971ecba427a64c83c268ba2d482bb63fee46e (commit) via 01e2d314eaf50040393a13aa8078f867a7c5917e (commit) via 9b5e2b6ceb52acc5a61ab5396bfacd06aa9985cd (commit) via 7fb6ee6c3b9469b8ae3d869a92597c6f03294511 (commit) via 97a07d234cd3cbf4217611693e72f4895c69a942 (commit) via 4fc89e5ff47fef8279872bbe956145b7e61141e0 (commit) via fc4f53b3094a7dada7dec096d2fbad55a0bbc184 (commit) via c4a72c18337864933890575a3c804e8a7f172725 (commit) via b372434e1bf2ad62fc62e2cdadfaac49f46cf13d (commit) via c71a03ac4a169da2c8dd6ef746ef01a600c22141 (commit) via 01d6af77052d4842b3bbef718918a1d412daa1e1 (commit) via a76e22e087ee5784e62508cf8ec29e2ab21634e6 (commit) via 780ab92c4e72b06ae71a0725e4a739f9b54225ac (commit) via 4e4203ba2047788730a832ae0a170fe9b9d7bae7 (commit) via 4fa139e6e846958311e8a2ed1acc0de42428679f (commit) via d3f78a07f15fa2321a2d19a66cbaa08073441418 (commit) via 5451fccf3c5c1cd0855f2dc932b3bcd5331e7b15 (commit) via a19bdcbdb23cb75a20fe73164cc7c45bce6af0d7 (commit) via 6eb8b57e8717879dcf30d0dbdc4235be516659bf (commit) via 808063f3501f45c3f00fa6ce6428319c9392cc70 (commit) via 7ac04623a9df976de0c5d379aebc88c8126739a7 (commit) via a9c4418872df7e82ff4e14171902d90bad2f7987 (commit) via ebf3262775ab5d785278cc5096c40bad16ac5dc5 (commit) via 8945e77196073b641208e991da067b3fcb63e5d7 (commit) via d0516cbdb20f6884e0c513ed56a218baf9c7283b (commit) via db286784aa52e906c04f636ea2c5d5f58192364d (commit) via c2a65e648556cfce850e3c19289a4587ae1a6ccf (commit) via 51f7bc66b09e61db6bd3c91b4f0c9ef58b21bc7b (commit) via 5e16cbd55ff6fc0ca2db757d4cca4b9da102d0bc (commit) via d2169b1b530a4555587128747942994e4d7a95d2 (commit) via 633991aa595fd9b375d71510b5f4f4470ac0f047 (commit) via 1a922e7a8a1158b172b88590d751dab50eb83a65 (commit) via 0c46735e42d175fb4c1a1fa00c267a55aaf35bdc (commit) via 2bdfe98c0bba4610708a1ebf9cf4db47916a6a9d (commit) via a6447a314a5e038909e67767f25fab4f8c8f3372 (commit) via 0f35195383794f1dcf4f1f8ae2ef5f07858aca50 (commit) via 4e788bd4be2950df996a2c0c739207d7bcb7f5d8 (commit) via 5790218b0893f7f0a5e5134122272ebb18cd7d92 (commit) via 4e9b47fbf3a3b49c8035cd9b99c631eaf659a810 (commit) via 691b7b1619b24eb868511e9e6c01f15d88cf5593 (commit) via 594713cde31afaa841f79cc6aed3fd4050a81a5f (commit) via 8f71e83348767590d87fbea0900bcad1373f1adc (commit) via 9d9879fa54fedf41b1b8c0ad2722351c3016aa40 (commit) via 6418d069fab3da999d5acd2cc9642af3e9a8781e (commit) via baf854baee4c0d91cea8ede74254b5294b0afded (commit) via 3f06a288043476f8a5d0ad59dae9d19d200cc6a9 (commit) via 2c66bfdc1df559e2e964fbc8a12cfb7a60c746df (commit) via 443082b7ef5f69e97f1d8f0e253bb96d0e8198fc (commit) via aafdb4f6069ecbdb379add3ae0dd922f10b01ea9 (commit) via 61295913b52b25d7eaebaad367b8905871d86af4 (commit) via f7feb8ed05092f1ff35198ece8f56c83cb2cdf04 (commit) via d915986e0120981ac466ee26e9b5efd6e6b58003 (commit) via 8f0aafd10f86de7b28b3e21ec6abc2b847c8009e (commit) via 67f321214dfb0c58d4b1ff21e4c5e1af3a072359 (commit) via 7aeafcc429cc2611354197b0db5c350fadd48bfe (commit) via 59f0d85306d7c8f40e2342d151d5ce5523ccbea9 (commit) via 8df1bb09f2964890064a22333c773f633716e241 (commit) via 19877e9971c2fdcba4d094c7ceccb70b86728e84 (commit) via 117e297f387b49403987460c19d0427e2b95a9e2 (commit) via eddc5294adaa3e39b3f1533208e8a7fc2520905e (commit) via 8156b292f0bda6d2f335d2f4bda6c5bb37709260 (commit) via 789f5888389f3e0aa1e948824c4b391a655b3cb0 (commit) via cc27921fa54a33125a649e7e8e2e2aa868762658 (commit) via 3873faf4381851d2ac70bf235bf0cfefcd14af57 (commit) via 30a8cb2f3121545ee5b4bd01a29b5d2808c5585f (commit) via cb18d6a74dec7482af131a46f5340f2ec2b0451e (commit) via 7e3f0d549dd34c2f02b68771655da8b7848b7aed (commit) via 417defa7183f63f0f1c96c3fad14a4b2ee33efc8 (commit) via 9b3d351fbd7a903ad4da9f9e9a654344a43e6ba1 (commit) via 8f9033e47ef46907343b53bafbed3d5549194870 (commit) via d553b22ba5a611eb42962b5d620e48c44dbd732c (commit) via 8030f6600cb4cc512b0e9eb539f3e7a15630a553 (commit) via 621259858ec670c217843a3a48acd5bc789cd001 (commit) via 5716ab79df45a7ba8e4717726b7cc0467e0a27e0 (commit) via 2d00f9f7698b624c0c46fa026f0965ce52801605 (commit) via 87d6ac5f28766d6cbe5b39104c7fd67d8591a20e (commit) via 1d14ca56409b5ce6472623c10cde009ca5a29a19 (commit) via ac647b5006be36a915d2efdb5733e54e2fac4dce (commit) via 579461a43ac1890f39b571d0c0efda846263be8c (commit) via 38c3c26c5e751a437f10f58cf58c99de1e242642 (commit) via c71fe3d967ea74866990ef1d109691e1002300d4 (commit) via 780aa79fa4ce360487bed6e6428d989f5457ecf8 (commit) via b9acb689c9d6c54e9ec304e816fe490c3991faf9 (commit) via 5b547fb74d1e39e66f6884addfb94007245b0e54 (commit) via ede57e81be6791a3a43157f1d10909c386a38fbf (commit) via 225cc5bbdd8aab1e38a53e75d9a7c6ddb3ecdaf6 (commit) via 7ba9038443b61a4de2c4181a75b2aebd033d0c03 (commit) via 1abda479d07f91ebf07fa1329d407aeb388978d4 (commit) via 2024f2e5d6c9e7555050dbd350ebc75210e0cbed (commit) via 9058a5d69b2fc3452e090a1f38727b66ec20be71 (commit) via f6f366b856fc001370119b2bfc772989abcdf3b1 (commit) via 08f46fad0c90ea5579ab4cd913b6bc1506bb4ca7 (commit) via f55586fcc744778a1cd412e59255328a0778b777 (commit) via dc220fd7be640f1202178eccde885397769388e0 (commit) via 4ec1f9a1966ece8baa9db0b82c0610b65bbf9a62 (commit) via e6242bbb599bfe7cfc254572888de1ce5f55532a (commit) via 06e1be1fbb0231e4227aee684e23bc9b289f5eb1 (commit) via f26434ca92423baf31f26ff5ca95aff90e02152a (commit) via ef977039c58644e42f14a1ab3224b368632c1fe4 (commit) via f20bc10158e798f7d72c4556db5ca6938912ae97 (commit) via d8c5bfeeb1da2d7fe4d978b5a05b7070db26ef9f (commit) via f1b3778db4984d1e9ef5a04819817ebe8b755d20 (commit) via ef5bd72457f522abe869552e49c21514a6d36d33 (commit) via c44c23b26bd12af0dea7b50f251019bfd8f59582 (commit) via 9d055f19e35f94f05f2ccdeee57b8f36b0a5cbb9 (commit) via 20812afb15f97fa57b2c909d211d73be08e692ce (commit) via b8af5afa0cb5d03c5daca61fc9a1a5790675fff4 (commit) via c3c3588160a816088bdbe1fc586e1b2461c6681b (commit) via 5f2a8979ff17e393a5b2492a09482a13e09b49ff (commit) via e9142254d431029e6e1d230b5f5c5de32ca13634 (commit) via 73c65b0311a0d272e2223ce83ffcebfc04d4c898 (commit) via 924fa7a7244f118b8a85031ed8a0e0a026de020e (commit) via af2ef30e2fc3e1fdbbe38c118405609fd0c7484e (commit) via 82ae45302c7ee163216f8fc3d5b3494a6f212e9c (commit) via 859f7e2d6ea511b833b1a02b2b887738c845d1fb (commit) via 4df4eb13c0177a1587ce86a8a87219c828809a92 (commit) via 9b12f766243a75cb840330fa941715b38aa609e4 (commit) via 7d92fe41d659ac9a1cfcf354d792178830315957 (commit) via 46953c5ca8945208733ce79a5d47dd6f72281a91 (commit) via 5288e987b4621bb2c999d4aa56f310cd6a9f6db6 (commit) via 61b67ec07bf0195dc206c109cd255a22a4a81127 (commit) via 9aca785f1728d116e2c350ba7bb1dd5c573889d5 (commit) via a7ba737e6276bf6b546eb721cca66d14d2bd4c29 (commit) via 29e18ad0c71a0e939b44b8933370a2f4cccefb2c (commit) via 5ad3e7fe864d1a87517c98c819530143a78e42ab (commit) via ba4723b55c553a4ec25cba267f1ae5852237ec1d (commit) via 9d1a33527f423039b5e80f6e87b0b2a0effa770b (commit) via 07c1422acd6b163b10d8e1ee46d10e91980f2a84 (commit) via 6f684667d9fd2fb80276ff3fbc41700db0c71e53 (commit) via f921b676a425104be902e5d92b24cc07d295ce98 (commit) via fb025e510226969088eefa33ed7826738a4d8d7e (commit) via a655a573b3d7bb9cf82b309bd3c026dab5fed4d2 (commit) via 13eb7b7678db635719ce387114837982b50663cc (commit) via 76cf797ec439aa06d3eb3ab2b1a4e2c1d5cb0b6b (commit) via 3fc30a4d2dd0d459d3e9452f72e8d5f0e1f9f12b (commit) via 9085636e2b5006a933fbd8121de60148ea0d3e27 (commit) via 75ef1f7c572574a44cbcd0ae1b4abb2b83ddd672 (commit) via 8bf9b69c5918d479e467d1c241a9e56e8d2e99ae (commit) via c651ae2e7656c700edcd0ad210bdedd871816a32 (commit) via e322c8bbdf151369fb7733c453fce6c99ef506d0 (commit) via 8107e808fa71a85ddce6f9220422283e0412c052 (commit) via 6bbc836c170627ff8a477d21829c7d4d7001c9b2 (commit) via 5de2fc876771b14802862db5b2fe1282c20f51ec (commit) via 71f11e0d957c34f14512dbeae973285f59e81621 (commit) via f7f725f472615ec9e2b2024633726f623adb7159 (commit) via b7fa39c6f0106040db280aca5becf81194efa330 (commit) via 52cf11788e5f608f77ebbeb8956856142b13d53f (commit) via 2ad462236f39824e4f832da5a178748178f4515d (commit) via 8ce097bae4c6a47cd1622096d1ec3a01a2fcd4b4 (commit) via 6e1dedfeb33bd68a0a7dfb872c4eeb72a8eaf724 (commit) via 69b25bbb26d87d43c96e404f822fefe5529ca340 (commit) via 3a8ec50ace9d5a288f130f43c19f5a1a5c823b23 (commit) via da34b442536f6e8d79054ed5ad991e08eb12c449 (commit) via 45e1c90da9bba58a51f295a42966e3863c5cb002 (commit) via 75629bc59e64ea7656905cec8538034ca5379634 (commit) via 430f32d5c7d68792e0ab74726b6287dfabbcc570 (commit) via 55d0c23035f1be3fd8aaa2f4a00e3096ade57b8c (commit) via 78e821bc6845557d90562faaf378e789aa9438e5 (commit) via f11face789f352bc90dd1a64aab61b1dcca97e0a (commit) via 91319f4d869ddd25c6ef63bf8f6d0d195d47fec9 (commit) via 7d91c2cb6fe2e9b9e34dd2b233c16b3d3dd787ad (commit) via 63a2febcfcbb639ab629397425f8c8cc8512b0bd (commit) via 7606e5dd841aa03d1c7f6f61cbc17f78a93a1d3e (commit) via 25fb808b26426d2068194ae170052cc3a363943f (commit) via 201a98005e53f66a7f3d4bd51d7b28f592a250a7 (commit) via 8aec93acf907888393d8bf27f6ac4dcb3f070c92 (commit) from b9726ca4867ba8cea4f945aebae4c3ad2e2e2889 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit a80f274ca6274b73a64a8ffbb984fbfc6cbf5bdb Author: Markus Metzger Date: Thu Mar 7 10:02:12 2013 +0100 btrace: fix crash when losing the remote connection on process exit Fix a crash reported by Jan Kratochvil. When a branch traced process exits in a remote debug scenario and we try to disable branch tracing, we would realize that the target connection is gone and thus pop all targets. This causes another attempt to disable branch tracing when we discard all threads, thus crashing GDB. This patch adds another path to disable branch tracing that is used when freeing the resources for a thread. Branch tracing is disabled normally on native targets - except that errors are silently ignored. For remote targets, the resources are freed when the threads are discarded. We further split to_close into to_stop_recording and to_close so we avdoid making any target access in to_close. In fact, to_close is empty, now. The patch will be split and merged into the btrace patch series. Change-Id: I242b6c4ec3adf387575d19dca536198e08a4daa6 Signed-off-by: Markus Metzger commit 6c823d270fb821a5a95188150b22a711891a0acd Author: Christian Himpel Date: Thu Mar 7 15:22:15 2013 +0100 testsuite, gdb.btrace: add btrace tests Recursive function calls are listed as only one function call. This is marked as a KFAIL with PR gdb/15420. The discussed crash of gdbserver after continue with btrace target enabled is tested now as well in the end of the enable.exp. In case of a gdbserver crash it reports UNRESOLVED, is that appropriate? 2013-03-04 Christian Himpel gdb/testsuite * Makefile.in: Add btrace testsuite. * configure: Regenerated. * configure.ac: Add btrace testsuite. * gdb.btrace/Makefile.in: New file. * gdb.btrace/enable.c: New file. * gdb.btrace/enable.exp: New file. * gdb.btrace/function_call_history.c: New file. * gdb.btrace/function_call_history.exp: New file. * gdb.btrace/instruction_history.c: New file. * gdb.btrace/instruction_history.exp: New file. * gdb.btrace/x86-instruction_history.S: New file. * lib/gdb.exp: Add btrace skip proc. Change-Id: Ida7c3f3a7445beedcbb870ade234c6d55300977e commit 0167c99b648522bfc98fb54cac0012055edb0061 Author: Markus Metzger Date: Mon Feb 25 16:05:49 2013 +0100 doc, record: document record changes Document changes to the record target resulting from the renaming into record-full. Document two new record sub-commands "record instruction-history" and "record function-call-history" and two associated set/show commands "set record instruction-history-size" and "set record function-call-history-size". Add this to NEWS. Doc approved by Eli Zaretskii. I modified the NEWS changes to incorporate feedback from Jan Kratochvil. Signed-off-by: Markus Metzger * NEWS: Add record changes. doc/ * gdb.texinfo (Process Record and Replay): Document record changes. Change-Id: I131473abaad524c8f40d13347c6864993ee29a3c commit 957809051c81f6cdc012f1782b62353bfa91bc37 Author: Markus Metzger Date: Wed Feb 13 08:43:47 2013 +0100 record-btrace, disas: omit pc prefix Add a disassembly flag to omit the pc prefix and use it in the "record instruction-history" command of record-btrace. The pc prefix would appear multiple times in the branch trace disassembly, which is more confusing than helpful. Approved by Jan Kratochvil. Signed-off-by: Markus Metzger * record-btrace.c (btrace_insn_history): Omit the pc prefix in the instruction history disassembly. * disasm.c (dump_insns): Omit the pc prefix, if requested. * disasm.h (DISASSEMBLY_OMIT_PC): New. Change-Id: I5c38256cc742ad9d6482ecc4d8800ab016c6f11b commit c8dc3d4eba117a44c4657409ea0f98387acaceed Author: Markus Metzger Date: Thu Jan 31 08:53:33 2013 +0100 record, btrace: add record-btrace target Add a target for branch trace recording. This will replace the btrace commands added earlier in the patch series. The target implements the new record sub-commands "record instruction-history" and "record function-call-history". The target does not support reverse execution or navigation in the recorded execution log. Approved by Jan Kratochvil. Signed-off-by: Markus Metzger * Makefile.in (SFILES): Add record-btrace.c (COMMON_OBS): Add record-btrace.o * record-btrace.c: New. * objfiles.c: Include btrace.h. (free_objfile): call btrace_free_objfile. Change-Id: I6398cad67cd7de80f09173a601bc00d77fe8809f commit 7046884d77037e293cf2bf4a41ee07d5dfdd39ca Author: Markus Metzger Date: Wed Feb 13 09:52:36 2013 +0100 record: add "record function-call-history" command Add command to print the function names from recorded instructions. The command supports iterating over the execution log similar to the "list" command. This command provides a quick high-level overview over the recorded execution log at function granularity without having to reverse-step. Doc approved by Eli Zaretskii. Approved by Jan Kratochvil. Signed-off-by: Markus Metzger * target.c (target_call_history, target_call_history_from, target_call_history_range): New. * target.h (target_ops) : New fields. (target_call_history, target_call_history_from, target_call_history_range): New declaration. * record.c (get_call_history_modifiers, cmd_record_call_history, record_call_history_size): New. (_initialize_record): Add the "record function-call-history" command. Add "set/show record function-call-history-size" commands. * record.h (record_print_flag): New. Change-Id: Icf16459162a88b0841902454b78d107c3cd279eb commit 8558e0fdf4c3d23e905167100e2fa11858f421d5 Author: Markus Metzger Date: Fri Feb 1 10:27:04 2013 +0100 record: add "record instruction-history" command Add a command to provide a disassembly of the execution trace log. The command iterates over the execution trace log similar to the "list" command. Doc approved by Eli Zaretskii. Approved by Jan Kratochvil. Signed-off-by: Markus Metzger * target.h (target_ops) : New fields. (target_insn_history): New. (target_insn_history_from): New. (target_insn_history_range): New. * target.c (target_insn_history): New. (target_insn_history_from): New. (target_insn_history_range): New. * record.c: Include cli/cli-utils.h, disasm.h, ctype.h. (record_insn_history_size): New. (get_insn_number): New. (get_context_size): New. (no_chunk): New. (get_insn_history_modifiers): New. (cmd_record_insn_history): New. (_initialize_record): Add "set/show record instruction-history-size" command. Add "record instruction-history" command. Change-Id: I64d52abba191ad14e2a4df790650d07202825a14 commit a4a8c198b80d1cd1fda5f9bf2f187136355b6c6f Author: Markus Metzger Date: Thu Feb 7 15:07:40 2013 +0100 record: default target methods. Provide default target methods for record targets that are likely to be shared between different record targets. Approved by Jan Kratochvil. Signed-off-by: Markus Metzger * record.h (record_disconnect): New. (record_detach): New. (record_mourn_inferior): New. (record_kill): New. * record-full.c (record_disconnect, record_detach, record_mourn_inferior, record_kill): Move to... * record.c: ...here. (DEBUG): New. (record_unpush): New. (cmd_record_stop): Use record_unpush. (record_disconnect, record_detach, record_mourn_inferior, record_kill): Use record_unpush and DEBUG. Change-Id: I1ba6f18301dbc63eb2bd8f059b5aff51e01c8d6b commit f30b575df2f78f0fbfaa39a46b5163ac54240ec6 Author: Markus Metzger Date: Tue Feb 12 09:58:47 2013 +0100 record-full.h: rename record_ into record_full_ Rename record_ prefixes in record-full.h into record_full_. I ran the gdb.reverse suite on 64bit IA gnu/linux - no regressions. Approved by Jan Kratochvil. Signed-off-by: Markus Metzger * record-full.h, record-full.c (record_memory_query): Rename to ... (record_full_memory_query): ...this. Update all users. (record_arch_list_add_reg): Rename to ... (record_full_arch_list_add_reg): ...this. Update all users. (record_arch_list_add_mem): Rename to ... (record_full_arch_list_add_mem): ...this. Update all users. (record_arch_list_add_end): Rename to ... (record_full_arch_list_add_end): ...this. Update all users. (record_gdb_operation_disable_set): Rename to ... (record_full_gdb_operation_disable_set): ...this. Update all users. Change-Id: I0c690de416e0b77c0dbcd11ba95eee77029466e9 commit 27ebbd20ff46ff14f57f319a49c22dfdf0aac833 Author: Markus Metzger Date: Tue Feb 12 09:35:04 2013 +0100 record-full.c: rename record_ in record_full_. Rename record_ prefixes in record-full.c into record_full_. I ran the gdb.reverse suite on 64bit IA gnu/linux - no regressions. Approved by Jan Kratochvil. Signed-off-by: Markus Metzger * record-full.c (DEFAULT_RECORD_INSN_MAX_NUM): Renamed to ... (DEFAULT_RECORD_FULL_INSN_MAX_NUM): ... this. Updated all users. (RECORD_IS_REPLAY): Renamed to ... (RECORD_FULL_IS_REPLAY): ... this. Updated all users. (RECORD_FILE_MAGIC): Renamed to ... (RECORD_FULL_FILE_MAGIC): ... this. Updated all users. (record_mem_entry): Renamed to ... (record_full_mem_entry): ... this. Updated all users. (record_reg_entry): Renamed to ... (record_full_reg_entry): ... this. Updated all users. (record_end_entry): Renamed to ... (record_full_end_entry): ... this. Updated all users. (record_type) : Renamed to ... (record_full_type) : ... this. Updated all users. (record_entry): Renamed to ... (record_full_entry): ... this. Updated all users. (record_core_buf_entry): Renamed to ... (record_full_core_buf_entry): ... this. Updated all users. (record_core_regbuf): Renamed to ... (record_full_core_regbuf): ... this. Updated all users. (record_core_start): Renamed to ... (record_full_core_start): ... this. Updated all users. (record_core_end): Renamed to ... (record_full_core_end): ... this. Updated all users. (record_core_buf_list): Renamed to ... (record_full_core_buf_list): ... this. Updated all users. (record_first): Renamed to ... (record_full_first): ... this. Updated all users. (record_list): Renamed to ... (record_full_list): ... this. Updated all users. (record_arch_list_head): Renamed to ... (record_full_arch_list_head): ... this. Updated all users. (record_arch_list_tail): Renamed to ... (record_full_arch_list_tail): ... this. Updated all users. (record_stop_at_limit): Renamed to ... (record_full_stop_at_limit): ... this. Updated all users. (record_insn_max_num): Renamed to ... (record_full_insn_max_num): ... this. Updated all users. (record_insn_num): Renamed to ... (record_full_insn_num): ... this. Updated all users. (record_insn_count): Renamed to ... (record_full_insn_count): ... this. Updated all users. (record_ops): Renamed to ... (record_full_ops): ... this. Updated all users. (record_core_ops): Renamed to ... (record_full_core_ops): ... this. Updated all users. (set_record_cmdlist): Renamed to ... (set_record_full_cmdlist): ... this. Updated all users. (show_record_cmdlist): Renamed to ... (show_record_full_cmdlist): ... this. Updated all users. (record_cmdlist): Renamed to ... (record_full_cmdlist): ... this. Updated all users. (record_beneath_to_resume_ops): Renamed to ... (record_full_beneath_to_resume_ops): ... this. Updated all users. (record_beneath_to_resume): Renamed to ... (record_full_beneath_to_resume): ... this. Updated all users. (record_beneath_to_wait_ops): Renamed to ... (record_full_beneath_to_wait_ops): ... this. Updated all users. (record_beneath_to_wait): Renamed to ... (record_full_beneath_to_wait): ... this. Updated all users. (record_beneath_to_store_registers_ops): Renamed to ... (record_full_beneath_to_store_registers_ops): ... this. Updated all users. (record_beneath_to_store_registers): Renamed to ... (record_full_beneath_to_store_registers): ... this. Updated all users. (record_beneath_to_xfer_partial_ops): Renamed to ... (record_full_beneath_to_xfer_partial_ops): ... this. Updated all users. (record_beneath_to_xfer_partial): Renamed to ... (record_full_beneath_to_xfer_partial): ... this. Updated all users. (record_beneath_to_insert_breakpoint): Renamed to ... (record_full_beneath_to_insert_breakpoint): ... this. Updated all users. (record_beneath_to_stopped_by_watchpoint): Renamed to ... (record_full_beneath_to_stopped_by_watchpoint): ... this. Updated all users. (record_beneath_to_stopped_data_address): Renamed to ... (record_full_beneath_to_stopped_data_address): ... this. Updated all users. (record_beneath_to_async): Renamed to ... (record_full_beneath_to_async): ... this. Updated all users. (record_goto_insn): Renamed to ... (record_full_goto_insn): ... this. Updated all users. (record_save): Renamed to ... (record_full_save): ... this. Updated all users. (record_reg_alloc): Renamed to ... (record_full_reg_alloc): ... this. Updated all users. (record_reg_release): Renamed to ... (record_full_reg_release): ... this. Updated all users. (record_mem_alloc): Renamed to ... (record_full_mem_alloc): ... this. Updated all users. (record_mem_release): Renamed to ... (record_full_mem_release): ... this. Updated all users. (record_end_alloc): Renamed to ... (record_full_end_alloc): ... this. Updated all users. (record_end_release): Renamed to ... (record_full_end_release): ... this. Updated all users. (record_entry_release): Renamed to ... (record_full_entry_release): ... this. Updated all users. (record_list_release): Renamed to ... (record_full_list_release): ... this. Updated all users. (record_list_release_following): Renamed to ... (record_full_list_release_following): ... this. Updated all users. (record_list_release_first): Renamed to ... (record_full_list_release_first): ... this. Updated all users. (record_arch_list_add): Renamed to ... (record_full_arch_list_add): ... this. Updated all users. (record_get_loc): Renamed to ... (record_full_get_loc): ... this. Updated all users. (record_check_insn_num): Renamed to ... (record_full_check_insn_num): ... this. Updated all users. (record_arch_list_cleanups): Renamed to ... (record_full_arch_list_cleanups): ... this. Updated all users. (record_message): Renamed to ... (record_full_message): ... this. Updated all users. (record_message_wrapper): Renamed to ... (record_full_message_wrapper): ... this. Updated all users. (record_message_wrapper_safe): Renamed to ... (record_full_message_wrapper_safe): ... this. Updated all users. (record_gdb_operation_disable): Renamed to ... (record_full_gdb_operation_disable): ... this. Updated all users. (record_hw_watchpoint): Renamed to ... (record_full_hw_watchpoint): ... this. Updated all users. (record_exec_insn): Renamed to ... (record_full_exec_insn): ... this. Updated all users. (record_restore): Renamed to ... (record_full_restore): ... this. Updated all users. (record_async_inferior_event_token): Renamed to ... (record_full_async_inferior_event_token): ... this. Updated all users. (record_async_inferior_event_handler): Renamed to ... (record_full_async_inferior_event_handler): ... this. Updated all users. (record_core_open_1): Renamed to ... (record_full_core_open_1): ... this. Updated all users. (record_open_1): Renamed to ... (record_full_open_1): ... this. Updated all users. (record_open): Renamed to ... (record_full_open): ... this. Updated all users. (record_close): Renamed to ... (record_full_close): ... this. Updated all users. (record_resume_step): Renamed to ... (record_full_resume_step): ... this. Updated all users. (record_resumed): Renamed to ... (record_full_resumed): ... this. Updated all users. (record_execution_dir): Renamed to ... (record_full_execution_dir): ... this. Updated all users. (record_resume): Renamed to ... (record_full_resume): ... this. Updated all users. (record_get_sig): Renamed to ... (record_full_get_sig): ... this. Updated all users. (record_sig_handler): Renamed to ... (record_full_sig_handler): ... this. Updated all users. (record_wait_cleanups): Renamed to ... (record_full_wait_cleanups): ... this. Updated all users. (record_wait_1): Renamed to ... (record_full_wait_1): ... this. Updated all users. (record_wait): Renamed to ... (record_full_wait): ... this. Updated all users. (record_stopped_by_watchpoint): Renamed to ... (record_full_stopped_by_watchpoint): ... this. Updated all users. (record_disconnect): Renamed to ... (record_full_disconnect): ... this. Updated all users. (record_detach): Renamed to ... (record_full_detach): ... this. Updated all users. (record_mourn_inferior): Renamed to ... (record_full_mourn_inferior): ... this. Updated all users. (record_kill): Renamed to ... (record_full_kill): ... this. Updated all users. (record_stopped_data_address): Renamed to ... (record_full_stopped_data_address): ... this. Updated all users. (record_registers_change): Renamed to ... (record_full_registers_change): ... this. Updated all users. (record_store_registers): Renamed to ... (record_full_store_registers): ... this. Updated all users. (record_xfer_partial): Renamed to ... (record_full_xfer_partial): ... this. Updated all users. (record_breakpoint): Renamed to ... (record_full_breakpoint): ... this. Updated all users. (record_breakpoint_p): Renamed to ... (record_full_breakpoint_p): ... this. Updated all users. (record_breakpoints): Renamed to ... (record_full_breakpoints): ... this. Updated all users. (record_sync_record_breakpoints): Renamed to ... (record_full_sync_record_breakpoints): ... this. Updated all users. (record_init_record_breakpoints): Renamed to ... (record_full_init_record_breakpoints): ... this. Updated all users. (record_insert_breakpoint): Renamed to ... (record_full_insert_breakpoint): ... this. Updated all users. (record_remove_breakpoint): Renamed to ... (record_full_remove_breakpoint): ... this. Updated all users. (record_can_execute_reverse): Renamed to ... (record_full_can_execute_reverse): ... this. Updated all users. (record_get_bookmark): Renamed to ... (record_full_get_bookmark): ... this. Updated all users. (record_goto_bookmark): Renamed to ... (record_full_goto_bookmark): ... this. Updated all users. (record_async): Renamed to ... (record_full_async): ... this. Updated all users. (record_can_async_p): Renamed to ... (record_full_can_async_p): ... this. Updated all users. (record_is_async_p): Renamed to ... (record_full_is_async_p): ... this. Updated all users. (record_execution_direction): Renamed to ... (record_full_execution_direction): ... this. Updated all users. (record_info): Renamed to ... (record_full_info): ... this. Updated all users. (record_delete): Renamed to ... (record_full_delete): ... this. Updated all users. (record_is_replaying): Renamed to ... (record_full_is_replaying): ... this. Updated all users. (record_goto_entry): Renamed to ... (record_full_goto_entry): ... this. Updated all users. (record_goto_begin): Renamed to ... (record_full_goto_begin): ... this. Updated all users. (record_goto_end): Renamed to ... (record_full_goto_end): ... this. Updated all users. (record_goto): Renamed to ... (record_full_goto): ... this. Updated all users. (init_record_ops): Renamed to ... (init_record_full_ops): ... this. Updated all users. (record_core_resume): Renamed to ... (record_full_core_resume): ... this. Updated all users. (record_core_kill): Renamed to ... (record_full_core_kill): ... this. Updated all users. (record_core_fetch_registers): Renamed to ... (record_full_core_fetch_registers): ... this. Updated all users. (record_core_prepare_to_store): Renamed to ... (record_full_core_prepare_to_store): ... this. Updated all users. (record_core_store_registers): Renamed to ... (record_full_core_store_registers): ... this. Updated all users. (record_core_xfer_partial): Renamed to ... (record_full_core_xfer_partial): ... this. Updated all users. (record_core_insert_breakpoint): Renamed to ... (record_full_core_insert_breakpoint): ... this. Updated all users. (record_core_remove_breakpoint): Renamed to ... (record_full_core_remove_breakpoint): ... this. Updated all users. (record_core_has_execution): Renamed to ... (record_full_core_has_execution): ... this. Updated all users. (init_record_core_ops): Renamed to ... (init_record_full_core_ops): ... this. Updated all users. (cmd_record_restore): Renamed to ... (cmd_record_full_restore): ... this. Updated all users. (record_save_cleanups): Renamed to ... (record_full_save_cleanups): ... this. Updated all users. (cmd_record_start): Renamed to ... (cmd_record_full_start): ... this. Updated all users. (set_record_insn_max_num): Renamed to ... (set_record_full_insn_max_num): ... this. Updated all users. (set_record_command): Renamed to ... (set_record_full_command): ... this. Updated all users. (show_record_command): Renamed to ... (show_record_full_command): ... this. Updated all users. (_initialize_record): Renamed to ... (_initialize_record_full): ... this. Updated all users. Change-Id: Id1393696ac9b918f96656d843143f48cebbd6e4b commit 73838e1682809e3cd74caf88e49ab6456500afae Author: Markus Metzger Date: Thu Jan 31 14:33:45 2013 +0100 record: make it build again Complete the split of record into record.c and record-full.c I ran the gdb.reverse suite on 64bit IA gnu/linux - no regressions. This will be merged with the previous patch to make each commit build. Approved by Jan Kratochvil. Signed-off-by: Markus Metzger * target.h (target_ops): Add new fields to_info_record, to_save_record, to_delete_record, to_record_is_replaying, to_goto_record_begin, to_goto_record_end, to_goto_record. (target_info_record): New. (target_save_record): New. (target_supports_delete_record): New. (target_delete_record): New. (target_record_is_replaying): New. (target_goto_record_begin): New. (target_goto_record_end): New. (target_goto_record): New. * target.c (target_info_record): New. (target_save_record): New. (target_supports_delete_record): New. (target_delete_record): New. (target_record_is_replaying): New. (target_goto_record_begin): New. (target_goto_record_end): New. (target_goto_record): New. * record.h: Declare struct cmd_list_element. (record_cmdlist): New declaration. (set_record_cmdlist): New declaration. (show_record_cmdlist): New declaration. (info_record_cmdlist): New declaration. (cmd_record_goto): New declaration. * record.c: Remove unnecessary includes. Include inferior.h. (cmd_record_goto): Remove declaration. (record_cmdlist): Now extern. Initialize. (set_record_cmdlist): Now extern. Initialize. (show_record_cmdlist): Now extern. Initialize. (info_record_cmdlist): Now extern. Initialize. (find_record_target): New. (require_record_target): New. (cmd_record_start): Update. (cmd_record_delete): Remove target-specific code. Call target_delete_record. (cmd_record_stop): Unpush any record target. (set_record_insn_max_num): Move to record-full.c (set_record_command): Add comment. (show_record_command): Add comment. (info_record_command): Update comment. Remove target-specific code. Call the record target's to_info_record. (cmd_record_start): New. (cmd_record_goto): Now extern. Remove target-specific code. Call target_goto_begin, target_goto_end, or target_goto. (_initialize_record): Move record target ops initialization to record-full.c. Change "record" command help text. Move "record restore", "record set", and "record show" commands to record-full.c. * Makefile.in (SFILES): Add record-full.c. (HFILES_NO_SRCDIR): Add record-full.h. (COMMON_OBS): Add record-full.o. * amd64-linux-tdep.c: Include record-full.h instead of record.h. * arm-tdep.c: Include record-full.h. * i386-linux-tdep.c: Include record-full.h instead of record.h. * i386-tdep.c: Include record-full.h. * infrun.c: Include record-full.h. * linux-record.c: Include record-full.h. * moxie-tdep.c: Include record-full.h. * record-full.c: Include record-full.h. Change module comment. (set_record_full_cmdlist): New. (show_record_full_cmdlist): New. (record_full_cmdlist): New. (record_goto_insn): New declaration. (record_save): New declaration. (record_check_insn_num): Change query string. (record_info): New. (record_delete): New. (record_is_replaying): New. (record_goto_entry): New. (record_goto_begin): New. (record_goto_end): New. (record_goto): New. (init_record_ops): Update. (init_record_core_ops): Update. (cmd_record_save): Rename to record_save. Remove target and arg checks. (cmd_record_start): New. (set_record_insn_max_num): Moved from record.c (set_record_full_command): New. (show_record_full_command): New. (_initialize_record_full): New. Change-Id: Iadf27b812f0f36921bd74d9d9bf36f7301b60f27 commit 7e8327d1c0bc60ddd88065cfb1f7aa6246bc10a9 Author: Markus Metzger Date: Wed Feb 6 14:16:02 2013 +0100 record: split record Split record.h into record.h and record-full.h. Split record.c into record.c and record-full.c. The split leaves the command part in record.c and moves the target part into record-full.c. The result does not build! This patch will be merged with the next patch before committing. Approved by Jan Kratochvil. Signed-off-by: Markus Metzger * record.h: Split into this and ... * record-full.h: ... this. * record.c: Split into this and ... * record-full.c: ... this. Change-Id: I0a55ddf0311406a1d977c1c375a04fdc63257a07 commit eccc532539169b381c27f8917f4d21380fd41c1e Author: Markus Metzger Date: Mon Feb 4 14:36:53 2013 +0100 target: add add_deprecated_target_alias Add a new function to target.h to add an alias command for a target and mark it deprecated. This is useful when renaming targets. Approved by Jan Kratochvil. Signed-off-by: Markus Metzger * target.h (add_deprecated_target_alias): New. * target.c (add_deprecated_target_alias): New. Change-Id: I6b679682475c9aa3bae3be300f79c08ce9bd3aee commit 45366ec40931a0658aa2962231b93eb8079f6611 Author: Markus Metzger Date: Thu Dec 6 11:06:14 2012 +0100 btrace, x86: disable on some processors LBR, BTM, or BTS records may have incorrect branch "from" information afer an EIST transition, T-states, C1E, or Adaptive Thermal Throttling (AAJ122). This results in sporadic test fails. Disable btrace on those processors. I added a kernel check before checking cpuid requested by Mark Kettenis. I added the cpuid vendor check requested by HJ. Approved by Jan Kratochvil. Approved by Mark Kettenis. Signed-off-by: Markus Metzger * common/linux-btrace.c: Include sys/ptrace, sys/types, sys/wait.h, and signal.h. (linux_supports_btrace): Add kernel and cpuid check. (kernel_supports_btrace): New function. (cpu_supports_btrace): New function. (intel_supports_btrace): New function. Change-Id: Ic79f4fb1b9714e91c4f7c1ec935a1123a99af190 commit c7b04a6fd212638b7f836520c7f5bd32e96827da Author: Markus Metzger Date: Wed Mar 6 13:23:08 2013 +0100 btrace, doc: document remote serial protocol Document the branch tracing extensions to the remote serial protocol. Approved by Eli Zaretskii. Signed-off-by: Markus Metzger doc/ * gdb.texinfo (Requirements): List qXfer:btrace:read requiring expat. (General Query Packets): Describe Qbtrace:bts, Qbtrace:off, and qXfer:btrace:read. Change-Id: I0b12adbe65f25ffd968b0928720612d81ef047dc commit 7649df3241d295ebd368cf6aefb0b6cb17c9807c Author: Markus Metzger Date: Wed Mar 6 13:18:10 2013 +0100 remote, gdbserver: add btrace support Add the gdb remote target operations for branch tracing. We define the following packets: Qbtrace:bts enable branch tracing for the current thread returns "OK" or "Enn" Qbtrace:off disable branch tracing for the current thread returns "OK" or "Enn" qXfer:btrace:read read the full branch trace data for the current thread Approved by Jan Kratochvil. CC: Pedro Alves Signed-off-by: Markus Metzger * target.h (enum target_object): Add TARGET_OBJECT_BTRACE. * remote.c: Include btrace.h. (struct btrace_target_info): New struct. (remote_supports_btrace): New function. (send_Qbtrace): New function. (remote_enable_btrace): New function. (remote_disable_btrace): New function. (remote_read_btrace): New function. (init_remote_ops): Add btrace ops. (enum ): Add btrace packets. (struct protocol_feature remote_protocol_features[]): Add btrace packets. (_initialize_remote): Add packet configuration for branch tracing. gdbserver/ * target.h (struct target_ops): Add btrace ops. (target_supports_btrace): New macro. (target_enable_btrace): New macro. (target_disable_btrace): New macro. (target_read_btrace): New macro. * gdbthread.h (struct thread_info): Add btrace field. * server.c: Include btrace-common.h. (handle_btrace_general_set): New function. (handle_btrace_enable): New function. (handle_btrace_disable): New function. (handle_general_set): Call handle_btrace_general_set. (handle_qxfer_btrace): New function. (struct qxfer qxfer_packets[]): Add btrace entry. * inferiors.c (remove_thread): Disable btrace. * linux-low: Include linux-btrace.h. (linux_low_enable_btrace): New function. (linux_low_read_btrace): New function. (linux_target_ops): Add btrace ops. * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o. Add srv_linux_btrace=yes. (x86_64-*-linux*): Add linux-btrace.o. Add srv_linux_btrace=yes. * configure.ac: Define HAVE_LINUX_BTRACE. * config.in: Regenerated. * configure: Regenerated. Change-Id: I232dc03681419a9fe9de173d22197b0a62e6ba63 commit 399bd92c935f580ff4ca794aa77b7d27a76018db Author: Markus Metzger Date: Thu Mar 7 08:34:02 2013 +0100 gdbserver: preserve error message in handle_qXfer Preserve a verbose error message of xfer functions if they return -3. Approved by Jan Kratochvil. CC: Pedro Alves Signed-off-by: Markus Metzger gdbserver/ * server.c (handle_qxfer): Preserve error message if -3 is returned. (qxfer): Document the -3 return value. Change-Id: Ic76975b5661d63d9f04eda7cccabfa31147a7d36 commit b05c304077ca43b74d8d3b62136b3f66fbb587e0 Author: Markus Metzger Date: Mon Jan 23 19:22:05 2012 +0100 xml, btrace: define btrace xml document style Define the xml document style for transferring branch trace data. Add a function to parse a btrace xml document into a vector of branch trace blocks. Approved by Jan Kratochvil. Signed-off-by: Markus Metzger * features/btrace.dtd: New file. * Makefile.in (XMLFILES): Add btrace.dtd. * btrace.h (parse_xml_btrace): New declaration. * btrace.c: Include xml-support.h. (parse_xml_btrace): New function. (parse_xml_btrace_block): New function. (block_attributes): New struct. (btrace_attributes): New struct. (btrace_children): New struct. (btrace_elements): New struct. Change-Id: I83b621a1aa60f90aa2693acee5704831ce8e426b commit de28e6d251107268f0867830eb040cc5e1476876 Author: Markus Metzger Date: Thu Jan 12 17:24:03 2012 +0100 linux, i386, amd64: enable btrace for 32bit and 64bit linux native Install the btrace target ops for i386-linux-nat and amd64-linux-nat. Approved by Jan Kratochvil. Signed-off-by: Markus Metzger * amd64-linux-nat.c: Include btrace.h and linux-btrace.h. (amd64_linux_enable_btrace): New. (amd64_linux_disable_btrace): New. (_initialize_amd64_linux_nat): Initialize btrace ops. * i386-linux.nat.c: Include btrace.h and linux-btrace.h. (i386_linux_enable_btrace): New. (i386_linux_disable_btrace): New. (_initialize_i386_linux_nat): Initialize btrace ops. * config/i386/linux.mh: Add linux-btrace.o. * config/i386/linux64.mh: Add linux-btrace.o. Change-Id: I3edae68584fa6dfd58c184c0427515b6c1028367 commit 4b6d9c5b65d617cc9297975522d8bc0f8dc889bd Author: Markus Metzger Date: Fri Jan 20 12:15:48 2012 +0100 linux, btrace: perf_event based branch tracing Implement branch tracing on Linux based on perf_event such taht it can be shared between gdb and gdbserver. The actual btrace target ops will be implemented on top. Approved by Jan Kratochvil. Signed-off-by: Markus Metzger * common/linux_btrace.h: New file. * common/linux_btrace.c: New file. * Makefile.in (SFILES): Add btrace.c. (HFILES_NO_SRCDIR): Add common/linux-btrace.h. (COMMON_OBS): Add btrace.o. (linux-btrace.o): New rule. gdbserver/ * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c. (linux_btrace_h): New variable. (linux-btrace.o): New rule. Change-Id: I2dd637d17366756b4187da22d35f905229578284 commit 084fd13fd75b3e452818383bc4cd8533b32ac9a3 Author: Markus Metzger Date: Tue Jan 10 19:31:26 2012 +0100 thread, btrace: add generic branch trace support Add branch trace information to struct thread_info to hold the branch trace information for that thread. Add functions to enable, disable, clear, and fetch a thread's branch trace. Approved by Jan Kratochvil. Signed-off-by: Markus Metzger * target.h: Include btrace.h. (struct target_ops): Add btrace ops. * target.c (update_current_target): Initialize btrace ops. (target_supports_btrace): New function. (target_enable_btrace): New function. (target_disable_btrace): New function. (target_read_btrace): New function. * btrace.h: New file. * btrace.c: New file. * Makefile.in: Add btrace.c. * gdbthread.h: Include btrace.h. (struct thread_info): Add btrace field. * thread.c: Include btrace.h. (clear_thread_inferior_resources): Call btrace_disable. * common/btrace-common.h: New file. Change-Id: Ie39f821b89778d926183975914992c81c0f82029 commit 61ea5d208bafd661f52b7db0d43cd2655741987f Author: gdbadmin Date: Fri Mar 8 00:00:34 2013 +0000 *** empty log message *** commit 53d2625aa5606dfd19ba3806eebeda54ce159f09 Author: Pedro Alves Date: Thu Mar 7 23:53:11 2013 +0000 target.c: fix -Wpointer-sign $ make WERROR_CFLAGS="-Wpointer-sign -Werror" target.o -k 2>&1 1>/dev/null ../../src/gdb/target.c: In function ‘target_read_stralloc’: ../../src/gdb/target.c:2376:3: error: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Werror=pointer-sign] In file included from build-gnulib/import/string.h:27:0, from ../../src/gdb/common/gdb_string.h:24, from ../../src/gdb/target.c:24: /usr/include/string.h:399:15: note: expected ‘const char *’ but argument is of type ‘gdb_byte *’ ... This is about the same as the previous patch. Functions that take or return ascii-ish string arguments usually use char* for parameters/return. That means that at points we call into target methods that work with binary blobs, we need casts to/from gdb_byte*/char*. To choose which type for the variables, I usually go based on which requires the fewer casts, and what the contents of the variable are supposed to hold, which often gives the same answer. gdb/ 2013-03-07 Pedro Alves * target.c (target_read_stralloc, target_fileio_read_alloc): *Cast pointer to 'gdb_byte *' in target call. commit c383fc030120a3e092381dda26a7e5d3999b9fee Author: Pedro Alves Date: Thu Mar 7 23:35:58 2013 +0000 corefile.c: fix -Wpointer-sign $ make WERROR_CFLAGS="-Wpointer-sign -Werror" corefile.o -k 2>&1 1>/dev/null ../../src/gdb/corefile.c: In function ‘read_memory_string’: ../../src/gdb/corefile.c:334:7: error: pointer targets in passing argument 2 of ‘read_memory’ differ in signedness [-Werror=pointer-sign] ../../src/gdb/corefile.c:217:1: note: expected ‘gdb_byte *’ but argument is of type ‘char *’ Functions that take or return ascii-ish string arguments usually use char* for parameters/return. That means that at points we call into target methods that work with binary blobs, we need casts to gdb_byte*. gdb/ 2013-03-07 Pedro Alves * corefile.c (read_memory_string): Cast pointer to gdb_byte* in call. commit 3255f72c09abc5fa6fba404460b68908158044b5 Author: Alan Modra Date: Thu Mar 7 23:00:05 2013 +0000 daily update commit 2954f54136e2d338b294b1ac033dff7826caf73f Author: Keith Seitz Date: Thu Mar 7 21:57:28 2013 +0000 * breakpoint.c (catch_syscall_split_args): Use skip_spaces. (trace_pass_command): Likewise. * cli/cli-cmds.c: Include cli/cli-utils.h. (source_command): Use skip-spaces. (disassemble_command): Likewise. * findcmd.c: Include cli/cli-utils.h. (parse_find_args): Use skip_spaces. * go32-nat.c: Include cli/cli-utils.h. (go32_sldt): Use skip_spaces. (go32_sgdt): Likewise. (go32_sidt): Likewise. (go32_pde): Likewise. (go32_pte): Likewise. (go32_pte_for_address): Likewise. * infcmd.c: Include cli/cli-utils.h. (registers_info): Use skip_spaces. * linux-tdep.c (read_mapping): Use skip_spaces_const. (linux_info_proc): Likewise. * linux-thread-db.c: Include cli/cli-utils.h. (info_auto_load_libthread_db): Use skip_spaces_const. * m32r-rom.c: Include cli/cli-utils.h. (m32r_upload_command): Use skip_spaces. * maint.c: Include cli/cli-utils.h. (maintenance_translate_address): Use skip_spaces. * mi/mi-parse.c: Include cli/cli-utils.h. (mi_parse_argv): Use skip_spaces. (mi_parse): Likewise. * minsyms.c: Include cli/cli-utils.h. (msymbol_hash_iw): Use skip_spaces_const. * objc-lang.c: Include cli/cli-utils.h. (parse_selector): Use skip_spaces. (parse_method): Likewise. * python/python.c: Include cli/cli-utils.h. (python_interactive_command)[HAVE_PYTHON]: Use skip_spaces. (python_command)[HAVE_PYTHON]: Likewise. (python_interactive_command)[!HAVE_PYTHON]: Likewise. * remote-m32r-sdi.c: Include cli/cli-utils.h. (m32r_load): Use skip_spaces. * serial.c: Include cli/cli-utils.h. (serial_open): Use skip_spaces_const. * stack.c: Include cli/cli-utils.h. (parse_frame_specification_1): Use skip_spaces_const. * symfile.c: Include cli/cli-utils.h. (set_ext_lang_command): Use skip_spaces. * symtab.c: Include cli/cli-utils.h. (rbreak_command): Use skip_spaces. * thread.c (thread_name_command): Use skip_spaces. * tracepoint.c (validate_actionline): Use skip_spaces. (encode_actions_1): Likewise. (trace_find_range_command): Likewise. (trace_find_outside_command): Likewise. (trace_dump_actions): Likewise. commit 2b1bc98105f6eb99b045645642216ce9d45153c7 Author: Pedro Alves Date: Thu Mar 7 19:24:27 2013 +0000 Fix -Wpointer-sign around strings/encoding conversions. Trimmed for brevity: $ make WERROR_CFLAGS="-Wpointer-sign -Werror" c-lang.o expprint.o utils.o valprint.o varobj.o -k 2>&1 1>/dev/null ../../src/gdb/c-lang.c: In function ‘parse_one_string’: ../../src/gdb/c-lang.c:540:8: error: pointer targets in passing argument 3 of ‘convert_between_encodings’ differ in signedness [-Werror=pointer-sign] In file included from ../../src/gdb/c-lang.c:30:0: ../../src/gdb/charset.h:64:6: note: expected ‘const gdb_byte *’ but argument is of type ‘char *’ ../../src/gdb/expprint.c: In function ‘print_subexp_standard’: ../../src/gdb/expprint.c:205:2: error: pointer targets in passing argument 3 of ‘current_language->la_printstr’ differ in signedness [-Werror=pointer-sign] ../../src/gdb/expprint.c:205:2: note: expected ‘const gdb_byte *’ but argument is of type ‘char *’ cc1: all warnings being treated as errors make: *** [expprint.o] Error 1 ../../src/gdb/utils.c: In function ‘host_char_to_target’: ../../src/gdb/utils.c:1474:9: error: pointer targets in passing argument 3 of ‘convert_between_encodings’ differ in signedness [-Werror=pointer-sign] ../../src/gdb/varobj.c: In function ‘value_get_print_value’: ../../src/gdb/varobj.c:2934:8: error: pointer targets in return differ in signedness [-Werror=pointer-sign] ../../src/gdb/varobj.c:2968:12: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign] ../../src/gdb/varobj.c:2971:3: error: pointer targets in return differ in signedness [-Werror=pointer-sign] cc1: all warnings being treated as errors make: *** [varobj.o] Error 1 As with the previous patch, the encoding conversion code works with gdb_byte arrays as the generic buffers that hold strings of any encoding/width. This patch adds casts where appropriate. gdb/ 2013-03-07 Pedro Alves * c-lang.c (parse_one_string): Cast argument to gdb_byte *. * expprint.c (print_subexp_standard): Likewise. * utils.c (host_char_to_target): Likewise. * valprint.c (generic_emit_char, generic_printstr): Likewise. * varobj.c (value_get_print_value): Change type of local to char*. Cast it gdb_byte * in call to language printer. commit 03a29636e9c8396fffddb01febb42c948cd92b20 Author: Pedro Alves Date: Thu Mar 7 19:10:37 2013 +0000 charset.c: fix -Wpointer-sign $ make WERROR_CFLAGS="-Wpointer-sign -Werror" charset.o 2>&1 1>/dev/null ../../src/gdb/charset.c: In function ‘wchar_iterate’: ../../src/gdb/charset.c:665:13: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign] ../../src/gdb/charset.c:691:13: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign] ../../src/gdb/charset.c:706:12: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign] The encoding conversion code works with gdb_byte arrays as the generic buffers that hold strings of any encoding/width. Changing the type of this field to gdb_byte* removes the need for one cast, and makes everything work with the same types. That's good -- WRT to strings, "char *" is (almost) consistently throughout GDB only used for ascii-ish strings. gdb/ 2013-03-07 Pedro Alves * charset.c (struct wchar_iterator) : Change type to 'const gdb_byte *'. (make_wchar_iterator): Remove cast to char*. (wchar_iterate): Change type of local. commit 4f4971ecba427a64c83c268ba2d482bb63fee46e Author: Pedro Alves Date: Thu Mar 7 18:59:52 2013 +0000 regcache.c: fix -Wpointer-sign $ make WERROR_CFLAGS="-Wpointer-sign -Werror" regcache.o 2>&1 1>/dev/null ../../src/gdb/regcache.c: In function ‘regcache_xmalloc_1’: ../../src/gdb/regcache.c:228:2: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign] ../../src/gdb/regcache.c:235:2: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign] cc1: all warnings being treated as errors regcache->register_status is "signed char". gdb/ 2013-03-07 Pedro Alves * regcache.c (regcache_xmalloc_1): Call XCALLOC with signed char for 'regcache->register_status'. commit 01e2d314eaf50040393a13aa8078f867a7c5917e Author: Pedro Alves Date: Thu Mar 7 18:53:40 2013 +0000 Fix typo. commit 9b5e2b6ceb52acc5a61ab5396bfacd06aa9985cd Author: Pedro Alves Date: Thu Mar 7 18:50:48 2013 +0000 breakpoint.c: fix -Wpointer-sign $ make WERROR_CFLAGS="-Wpointer-sign -Werror" breakpoint.o 2>&1 1>/dev/null ../../src/gdb/breakpoint.c: In function ‘breakpoint_xfer_memory’: ../../src/gdb/breakpoint.c:1578:2: error: pointer targets in passing argument 3 of ‘gdbarch_breakpoint_from_pc’ differ in signedness [-Werror=pointer-sign] In file included from ../../src/gdb/defs.h:644:0, from ../../src/gdb/breakpoint.c:20: ../../src/gdb/gdbarch.h:495:25: note: expected ‘int *’ but argument is of type ‘unsigned int *’ target_info.placed_size is an 'int', and gdbarch_breakpoint_from_pc takes an int too. gdb/ 2013-03-07 Pedro Alves * breakpoint.c.c (breakpoint_xfer_memory): Change type of local to int. commit 7fb6ee6c3b9469b8ae3d869a92597c6f03294511 Author: Pedro Alves Date: Thu Mar 7 18:45:47 2013 +0000 stap-probe.c: fix -Wpointer-sign $ make WERROR_CFLAGS="-Wpointer-sign -Werror" stap-probe.o 2>&1 1>/dev/null ../../src/gdb/stap-probe.c: In function ‘handle_stap_probe’: ../../src/gdb/stap-probe.c:1306:19: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign] cc1: all warnings being treated as errors make: *** [stap-probe.o] Error 1 provider is a string, so it's rightfully a char*. 'data' holds raw bytes (bfd_byte), so a cast is the right thing to do. gdb/ 2013-03-07 Pedro Alves * stap-probe.c (handle_stap_probe): Add cast to char*. commit 97a07d234cd3cbf4217611693e72f4895c69a942 Author: Pedro Alves Date: Thu Mar 7 18:29:04 2013 +0000 linux-record.c:record_linux_system_call: fix -Wpointer-sign $ make WERROR_CFLAGS="-Wpointer-sign -Werror" linux-record.o 2>&1 1>/dev/null ... ../../src/gdb/linux-record.c: In function ‘record_linux_system_call’: ../../src/gdb/linux-record.c:1152:9: error: pointer targets in passing argument 3 of ‘regcache_raw_read_signed’ differ in signedness [-Werror=pointer-sign] In file included from ../../src/gdb/linux-record.c:23:0: ../../src/gdb/regcache.h:76:3: note: expected ‘long int *’ but argument is of type ‘long unsigned int *’ ../../src/gdb/linux-record.c:1186:13: error: pointer targets in passing argument 3 of ‘regcache_raw_read_signed’ differ in signedness [-Werror=pointer-sign] In file included from ../../src/gdb/linux-record.c:23:0: ../../src/gdb/regcache.h:76:3: note: expected ‘long int *’ but argument is of type ‘long unsigned int *’ I believe the read_signed calls are correct, and the variables are in the wrong. Tested on x86_64 Fedora 17. gdb/ 2013-03-07 Pedro Alves * linux-record.c (record_linux_system_call) : Pass a signed variable to regcache_raw_read_signed, instead of an unsigned one. commit 4fc89e5ff47fef8279872bbe956145b7e61141e0 Author: Pedro Alves Date: Thu Mar 7 17:52:57 2013 +0000 remote-notif.[h|c]:notif_debug: Change type to int. notif_debug is installed as variable of a "signed" command: add_setshow_boolean_cmd ("notification", no_class, ¬if_debug, _("\ and: command.h:extern void add_setshow_boolean_cmd (char *name, command.h- enum command_class class, command.h- int *var, 2013-03-07 Pedro Alves * remote-notif.c (notif_debug): Change type to int. * remote-notif.h (notif_debug): Likewise. commit fc4f53b3094a7dada7dec096d2fbad55a0bbc184 Author: Pedro Alves Date: Thu Mar 7 17:36:23 2013 +0000 ser-tcp.c:tcp_retry_limit: Change type to unsigned int. tcp_retry_limit is installed as variable of an unsigned command: add_setshow_uinteger_cmd ("connect-timeout", class_obscure, &tcp_retry_limit, _("\ and I found no uses of the variable treating it as signed (like < 0 checks or some such). 2013-03-07 Pedro Alves * ser-tcp.c (tcp_retry_limit): Change type to unsigned int. commit c4a72c18337864933890575a3c804e8a7f172725 Author: Pedro Alves Date: Thu Mar 7 17:29:30 2013 +0000 hex2bin, bin2hex: move declarations to header. Move the declarations to a header, rather than declaring them in (multiple) .c files. gdb/ 2013-03-07 Pedro Alves * remote.c (hex2bin, bin2hex): Move extern declarations to ... * remote.h (hex2bin, bin2hex): ... here. * tracepoint.c (hex2bin, bin2hex): Remove extern declarations. commit b372434e1bf2ad62fc62e2cdadfaac49f46cf13d Author: qiyao Date: Thu Mar 7 13:17:28 2013 +0000 gdb/gdbserver/ * tracepoint.c (cur_action, cur_step_action): Make them unsigned. (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead of -1. (cmd_qtsp): Adjust condition. Do post increment. Set cur_action and cur_step_action back to 0. commit c71a03ac4a169da2c8dd6ef746ef01a600c22141 Author: Eli Zaretskii Date: Thu Mar 7 12:26:05 2013 +0000 * utils.c (initialize_utils): Improve doc strings of "set/show width", "set/show height", and "set/show pagination". commit 01d6af77052d4842b3bbef718918a1d412daa1e1 Author: Pedro Alves Date: Thu Mar 7 09:47:57 2013 +0000 PR gdb/15236: gdbserver write to linux memory with zero length corrupts stack PROBLEM: The function linux_write_memory () in linux-low.c allocates a buffer on the stack to hold a copy of the data to be written. register PTRACE_XFER_TYPE *buffer = (PTRACE_XFER_TYPE *) alloca (count * sizeof (PTRACE_XFER_TYPE)); "count" is the number of bytes to be written, rounded up to the nearest multiple of sizeof (PTRACE_XFER_TYPE) and allowing for not being an aligned address. The function later uses buffer[0] = ptrace (PTRACE_PEEKTEXT, pid, (PTRACE_ARG3_TYPE) (uintptr_t) addr, 0); The problem is that this function can be called to write zero bytes on an aligned address, for example when receiving an X packet of length 0 (used to test if 8-bit write is supported). Under these circumstances, count can be zero. Since in this case, buffer[0] may never have been allocated, the stack is corrupted and gdbserver may crash. SOLUTION: Writing zero bytes should always succeed. The patch below returns successfully early if the length is zero, so avoiding the stack corruption. Verified on the ARC GDB 7.5.1 port. 2013-03-07 Jeremy Bennett PR server/15236 * linux-low.c (linux_write_memory): Return early success if LEN is zero. commit a76e22e087ee5784e62508cf8ec29e2ab21634e6 Author: Keith Seitz Date: Thu Mar 7 00:48:19 2013 +0000 * ax-gdb.c (gen_printf): Make FORMAT const. * ax-gdb.h (gen_printf): Likewise. * ax-general.c (ax_string): Make STR const. * ax.h (ax_string): Likewise. commit 780ab92c4e72b06ae71a0725e4a739f9b54225ac Author: gdbadmin Date: Thu Mar 7 00:00:34 2013 +0000 *** empty log message *** commit 4e4203ba2047788730a832ae0a170fe9b9d7bae7 Author: Alan Modra Date: Wed Mar 6 23:00:05 2013 +0000 daily update commit 4fa139e6e846958311e8a2ed1acc0de42428679f Author: Doug Evans Date: Wed Mar 6 21:20:01 2013 +0000 * elfread.c (elf_symfile_read): Move debugging printf to more logical location. commit d3f78a07f15fa2321a2d19a66cbaa08073441418 Author: Pedro Alves Date: Wed Mar 6 19:51:15 2013 +0000 Garbage collect py-utils.c:target_string_to_unicode. The strlen in this function looked suspicious, for the function documents that STR is in the target's charset (what if it is utf-32, etc.). On closer inspection, nothing is calling the function, and it's been that way ever since the function was added. gdb/ 2013-03-06 Pedro Alves * python/py-utils.c (target_string_to_unicode): Delete function. * python/python-internal.h (target_string_to_unicode): Delete declaration. commit 5451fccf3c5c1cd0855f2dc932b3bcd5331e7b15 Author: Pedro Alves Date: Wed Mar 6 12:13:40 2013 +0000 tstatus.exp: use UNSUPPORTED for optional features that are not supported The current tstatus.exp tests shows PASSes if either the target support or not the optional tstatus bits: PASS: gdb.trace/tstatus.exp: tstatus does not report trace stop reason PASS: gdb.trace/tstatus.exp: tstatus reports trace stop reason The former (and any other similar case) should be UNSUPPORTED rather than PASS. That'd make it much easier to spot actually problems with the test (e.g., the one Yao's previous patch addressed), along with regressions and progressions. The "not supported" paths in tstatus.exp explicitly check for output you'd get if the feature wasn't supported, so real unexpected failures will still be caught as FAILs. So now e.g., where we wanted to check if tstatus reports the trace stop reason, and if the target does support it, we get PASS: tstatus reports trace stop reason if the target actually reports what we'd expect if the trace stop reason isn't supported, we get: UNSUPPORTED: tstatus reports trace stop reason and if the target reports something else unexpected, we get: FAIL: tstatus reports trace stop reason That has the added bonus that the test string is always the same and only the test results change (PASS/FAIL/UNSUPPORTED), which makes it easier for testers see regressions, compared to the previous: -PASS: gdb.trace/tstatus.exp: tstatus reports trace stop reason +PASS: gdb.trace/tstatus.exp: tstatus does not report trace stop reason which clearly easily goes by unnoticed, as evidenced by the existing problem Yao's previous patch addressed. Tested on x86_64 Fedora 17. gdb/testsuite/ 2013-03-06 Pedro Alves * gdb.trace/tstatus.exp (run_trace_experiment): When the target doesn't support the tested optional feature, call "unsupported" with the same test message as the "pass" case, instead of calling "pass" with a different message. Use the same text for the "fail" cases too. commit a19bdcbdb23cb75a20fe73164cc7c45bce6af0d7 Author: Pierre Muller Date: Wed Mar 6 11:05:54 2013 +0000 * linespec.c (get_current_search_block): ARI fix, use (void) for empty parameter list. ----------------------------------------------------------------------- Summary of changes: gdb/doc/gdb.texinfo | 5 - gdb/gdbserver/server.c | 39 --- gdb/infcmd.c | 1 - gdb/testsuite/gdb.btrace/a.S | 23 -- gdb/testsuite/gdb.btrace/allthreads_trace.exp | 345 ---------------------- gdb/testsuite/gdb.btrace/amd64-thr-callback.S | 116 -------- gdb/testsuite/gdb.btrace/b.S | 23 -- gdb/testsuite/gdb.btrace/dec.c | 23 -- gdb/testsuite/gdb.btrace/decrement.S | 32 -- gdb/testsuite/gdb.btrace/decrement.exp | 141 --------- gdb/testsuite/gdb.btrace/disable_all.exp | 279 ----------------- gdb/testsuite/gdb.btrace/enable_all.exp | 282 ------------------ gdb/testsuite/gdb.btrace/enable_range.exp | 281 ------------------ gdb/testsuite/gdb.btrace/i386-thr-callback.S | 116 -------- gdb/testsuite/gdb.btrace/inc.c | 23 -- gdb/testsuite/gdb.btrace/list.exp | 175 ----------- gdb/testsuite/gdb.btrace/list_function.c | 31 -- gdb/testsuite/gdb.btrace/list_function.exp | 50 --- gdb/testsuite/gdb.btrace/list_options.exp | 107 ------- gdb/testsuite/gdb.btrace/main.S | 36 --- gdb/testsuite/gdb.btrace/main_asm.exp | 109 ------- gdb/testsuite/gdb.btrace/main_segv.S | 32 -- gdb/testsuite/gdb.btrace/main_segv.exp | 84 ------ gdb/testsuite/gdb.btrace/threads.c | 96 ------ gdb/testsuite/gdb.btrace/threads_asm.c | 78 ----- gdb/testsuite/gdb.btrace/threads_auto.exp | 123 -------- gdb/testsuite/gdb.btrace/threads_independent.exp | 125 -------- gdb/testsuite/gdb.btrace/threads_nonstop.exp | 231 --------------- gdb/testsuite/gdb.btrace/trace_iteration.exp | 265 ----------------- gdb/testsuite/gdb.btrace/x86-list.S | 70 ----- gdb/testsuite/lib/btrace.exp | 78 ----- 31 files changed, 0 insertions(+), 3419 deletions(-) mode change 100755 => 100644 gdb/testsuite/gdb.btrace/Makefile.in delete mode 100755 gdb/testsuite/gdb.btrace/a.S delete mode 100755 gdb/testsuite/gdb.btrace/allthreads_trace.exp delete mode 100755 gdb/testsuite/gdb.btrace/amd64-thr-callback.S delete mode 100755 gdb/testsuite/gdb.btrace/b.S delete mode 100644 gdb/testsuite/gdb.btrace/dec.c delete mode 100755 gdb/testsuite/gdb.btrace/decrement.S delete mode 100755 gdb/testsuite/gdb.btrace/decrement.exp delete mode 100755 gdb/testsuite/gdb.btrace/disable_all.exp delete mode 100755 gdb/testsuite/gdb.btrace/enable_all.exp delete mode 100755 gdb/testsuite/gdb.btrace/enable_range.exp delete mode 100755 gdb/testsuite/gdb.btrace/i386-thr-callback.S delete mode 100644 gdb/testsuite/gdb.btrace/inc.c delete mode 100644 gdb/testsuite/gdb.btrace/list.exp delete mode 100644 gdb/testsuite/gdb.btrace/list_function.c delete mode 100644 gdb/testsuite/gdb.btrace/list_function.exp delete mode 100755 gdb/testsuite/gdb.btrace/list_options.exp delete mode 100755 gdb/testsuite/gdb.btrace/main.S delete mode 100755 gdb/testsuite/gdb.btrace/main_asm.exp delete mode 100755 gdb/testsuite/gdb.btrace/main_segv.S delete mode 100755 gdb/testsuite/gdb.btrace/main_segv.exp delete mode 100755 gdb/testsuite/gdb.btrace/threads.c delete mode 100755 gdb/testsuite/gdb.btrace/threads_asm.c delete mode 100755 gdb/testsuite/gdb.btrace/threads_auto.exp delete mode 100755 gdb/testsuite/gdb.btrace/threads_independent.exp delete mode 100755 gdb/testsuite/gdb.btrace/threads_nonstop.exp delete mode 100755 gdb/testsuite/gdb.btrace/trace_iteration.exp delete mode 100644 gdb/testsuite/gdb.btrace/x86-list.S delete mode 100644 gdb/testsuite/lib/btrace.exp First 500 lines of diff: diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index d11426a..b2462a9 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -37393,11 +37393,6 @@ These are the currently defined stub features and their properties: @tab @samp{-} @tab No -@item @samp{qbtrace} -@tab No -@tab @samp{-} -@tab Yes - @item @samp{qXfer:auxv:read} @tab No @tab @samp{-} diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 73336bd..fc53dc3 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -1580,42 +1580,6 @@ crc32 (CORE_ADDR base, int len, unsigned int crc) return (unsigned long long) crc; } -/* Handle the "qbtrace" packet. */ - -static int -handle_btrace_query (char *own_buf) -{ - if (strncmp ("qbtrace", own_buf, strlen ("qbtrace")) == 0) - { - struct thread_info *thread; - - if (ptid_equal (general_thread, null_ptid) - || ptid_equal (general_thread, minus_one_ptid)) - { - strcpy (own_buf, "E.Must select a single thread."); - return -1; - } - - thread = find_thread_ptid (general_thread); - if (thread == NULL) - { - strcpy (own_buf, "E.No such thread."); - return -1; - } - - if (thread->btrace == NULL) - { - strcpy (own_buf, "E.Btrace not enabled."); - return -1; - } - - strcpy (own_buf, - (target_btrace_has_changed (thread->btrace) ? "yes" : "no")); - return 1; - } - return 0; -} - /* Handle all of the extended 'q' packets. */ void @@ -2042,9 +2006,6 @@ handle_query (char *own_buf, int packet_len, int *new_packet_len_p) if (target_supports_tracepoints () && handle_tracepoint_query (own_buf)) return; - if (handle_btrace_query (own_buf)) - return; - /* Otherwise we didn't know what packet it was. Say we didn't understand it. */ own_buf[0] = 0; diff --git a/gdb/infcmd.c b/gdb/infcmd.c index cb2e99a..866388f 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -2722,7 +2722,6 @@ detach_command (char *args, int from_tty) error (_("The program is not being run.")); disconnect_tracing (from_tty); - disconnect_btrace (); target_detach (args, from_tty); diff --git a/gdb/testsuite/gdb.btrace/Makefile.in b/gdb/testsuite/gdb.btrace/Makefile.in old mode 100755 new mode 100644 diff --git a/gdb/testsuite/gdb.btrace/a.S b/gdb/testsuite/gdb.btrace/a.S deleted file mode 100755 index b457975..0000000 --- a/gdb/testsuite/gdb.btrace/a.S +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2012 Free Software Foundation, Inc. -# -# Contributed by Intel Corp. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - .text - .globl callA - .type callA, @function -callA: - nop - ret diff --git a/gdb/testsuite/gdb.btrace/allthreads_trace.exp b/gdb/testsuite/gdb.btrace/allthreads_trace.exp deleted file mode 100755 index 8af544c..0000000 --- a/gdb/testsuite/gdb.btrace/allthreads_trace.exp +++ /dev/null @@ -1,345 +0,0 @@ -# Copyright 2012 Free Software Foundation, Inc. -# -# Contributed by Barkha Ahuja -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -############### -#Test Purpose: In GDB non-stop mode, Enable trace for all the threads by "btr enable auto" on primary thread and check the trace availability for all the threads -# Sourcefiles : threads_asm.c, i386-thr-callback.S, amd64-thr-callback.S -# Compiled using '-g -lpthread' option. -#executed as : -# make check RUNTESTFLAGS="GDB= gdb.trace/allthreads_trace.exp" -############### - -load_lib btrace.exp - -# check for btrace support -if { [skip_btrace_tests] } { return -1 } - -# the tests do currently not work with gdbserver -if [is_remote target] { - untested "allthreads_trace.exp" - return -1 -} - -# start fresh - without an executable -gdb_exit -gdb_start - -global srcdir -global objdir -global subdir - -set srcfilemain ${srcdir}/${subdir}/threads_asm.c -set objcallback ${objdir}/${subdir}/thr_callback.o -set objmain ${objdir}/${subdir}/threads_asm.o -set binfile ${objdir}/${subdir}/allthreads_trace.x -set options "{debug}" - -if { ![support_displaced_stepping] } { - unsupported "displaced stepping" - return -1 -} - -#Load different callback files for 32 and 64 bit. -# 32 bit platform -if {[istarget "i?86-*-*"]} { - set srccallback ${srcdir}/${subdir}/i386-thr-callback.S -} elseif {[istarget "x86_64-*-*"]} { - set srccallback ${srcdir}/${subdir}/amd64-thr-callback.S -} else { - warning "host platform not supported " - untested allthreads_trace.exp - return -1 -} -set objfiles "${objmain} ${objcallback}" - -#compile -if {[gdb_compile_pthreads ${srcfilemain} ${objmain} "object" ${options}] != ""} { - untested allthreads_trace.exp - return -1 -} -if {[gdb_compile ${srccallback} ${objcallback} "object" ${options}] != ""} { - untested allthreads_trace.exp - return -1 -} - -if {[gdb_compile_pthreads ${objfiles} ${binfile} "executable" ${options}] != ""} { - untested allthreads_trace.exp - return -1 -} - -gdb_reinitialize_dir $srcdir/$subdir -gdb_load $binfile - -gdb_test_no_output "set pagination off" -gdb_test_no_output "set target-async 1" -gdb_test_no_output "set non-stop 1" - -if ![runto_main] then { - fail "Can't run to main" - return 0 -} -# set breakpoint at line 67, at call to mybarrier() for primary thread. -gdb_breakpoint "67" "Breakpoint 2 at.*: file.*threads_asm.c, line 67." " breakpoint at line 67, 1.1" - -# set a breakpoint at mybarrier() to halt all the new threads from exiting. -gdb_breakpoint "mybarrier" "Breakpoint 3, mybarrier \\(\\) at .*thr-callback.S:114" "Breakpoint at my barrier for all the threads to stop, 1.2" - -# enable trace in primary thread, which automatically enables trace in all new threads crated. -gdb_test "btr enable auto" - -set test "continue running..." -gdb_test_multiple "continue" $test { - -re "Breakpoint 3, mybarrier \\(\\) at.*thr-callback.S:114.*" - { - pass "continuing" - } - timeout {fail "(timeout) continue into program"} -} -# this is added to get the prompt, which is missing. -gdb_test "" "" - -# This "info threads" is needed to get a $gdb_prompt, since gdb seems to get hanged at this particular location. -set test "info for threads" -gdb_test_multiple "info threads" $test { - -re ".*\n" { - pass $test - } -} - -# this is added to get the prompt, which is missing. -gdb_test "" "" - -# We need to do a seperate listing from here, since the instr length is different -# on different platforms. -gdb_test_multiple "thread 2" "switching to thread 2" { - -re ".*Switching to thread 2.*mybarrier.*$gdb_prompt $" { - pass "switch to thread 2, 1.3" - } - timeout { - fail "switching to thread 2 (timeout), 1.3" - } -} - -# 64 bit platform -if {[istarget "x86_64-*-*"]} { - -# trace for thread 2 -gdb_test "btr list /a" " -1 0x\[a-f0-9\]* - 0x\[a-f0-9\]*\r -2 0x\[a-f0-9\]* - 0x\[a-f0-9\]*\r -.*" "BTR listing for thread 2, 1.4" - -gdb_test "btr /m 1" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*push.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r -=> *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*" " BTR of 1 for thread 2, 1.5" - -gdb_test "btr +" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*call.*" " BTR of 2 for thread 2, 1.6" - -# trace for thread 3 -gdb_test_multiple "thread 3" "switching to thread 3" { - -re ".*Switching to thread 3.*mybarrier.*$gdb_prompt $" { - pass "switch to thread 3, 1.7" - } - timeout { - fail "switching to thread 3 (timeout), 1.7" - } -} - -gdb_test "btr list /la" " -1 *0x\[a-f0-9\]* - 0x\[a-f0-9\]* at .*amd64-thr-callback.S:112-114\r -2 *0x\[a-f0-9\]* - 0x\[a-f0-9\]* at .*amd64-thr-callback.S:44-45\r -3 *0x\[a-f0-9\]* - 0x\[a-f0-9\]* at .*amd64-thr-callback.S:85-89\r -4 *0x\[a-f0-9\]* - 0x\[a-f0-9\]* at .*amd64-thr-callback.S:40-43\r -.*" "BTR listing for thread 3, 1.8" - -gdb_test "btr +" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*push.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r -=> *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*" " BTR of 1 for thread 3, 1.9" - -gdb_test "btr +" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*call.*" " BTR of 2 for thread 3, 1.10" - -# trace for thread 4 -gdb_test_multiple "thread 4" "switching to thread 4" { - -re ".*Switching to thread 4.*mybarrier.*$gdb_prompt $" { - pass "switch to thread 4, 1.11" - } - timeout { - fail "switching to thread 4 (timeout), 1.11" - } -} - -gdb_test "btr list /lf" " -1 *in mybarrier at.*amd64-thr-callback.S:112-114\r -2 *in th_c at.*amd64-thr-callback.S:56-57\r -3 *in call_C at.*amd64-thr-callback.S:94-98\r -4 *in th_c at.*amd64-thr-callback.S:52-55\r -.*" "BTR listing for thread 4, 1.12" - -gdb_test "btr /m 1" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*push.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r -=> *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*" " BTR of 1 for thread 4, 1.13" - -gdb_test "btr +" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*call.*" " BTR of 2 for thread 4, 1.14" - -# trace for thread 5 -gdb_test_multiple "thread 5" "switching to thread 5" { - -re ".*Switching to thread 5.*mybarrier.*$gdb_prompt $" { - pass "switch to thread 5, 1.15" - } - timeout { - fail "switching to thread 5 (timeout), 1.15" - } -} - -gdb_test "btr list /fa" " -1 *0x\[a-f0-9\]* - 0x\[a-f0-9\]* in mybarrier\r -2 *0x\[a-f0-9\]* - 0x\[a-f0-9\]* in th_d\r -.*" "BTR listing for thread 5, 1.16" - -gdb_test "btr " " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*push.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r -=> *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*" " BTR of 1 for thread 5, 1.17" - -gdb_test "btr +" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*call.*" " BTR of 2 for thread 5, 1.18" - - gdb_test "btr +" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*push.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*leave.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*ret.*\r" " BTR of 3 for thread 5, 1.19" - -} elseif {[istarget "i?86-*-*"]} { -# 32 bit platform - -#trace for thread 2 -gdb_test "btr list /a" " -1 0x\[a-f0-9\]* - 0x\[a-f0-9\]*\r -2 0x\[a-f0-9\]* - 0x\[a-f0-9\]*\r -.*" "BTR listing for thread 2, 1.4" - -gdb_test "btr /m 1" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*push.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r -=> *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*" " BTR of 1 for thread 2, 1.5" - -gdb_test "btr +" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*call.*" " BTR of 2 for thread 2, 1.6" - -#switch to thread 3 -gdb_test_multiple "thread 3" "switching to thread 3" { - -re ".*Switching to thread 3.*mybarrier.*$gdb_prompt $" { - pass "switch to thread 3, 1.7" - } - timeout { - fail "switching to thread 3 (timeout), 1.7" - } -} - -#trace for thread 3 -gdb_test "btr list /la" " -1 *0x\[a-f0-9\]* - 0x\[a-f0-9\]* at .*i386-thr-callback.S:112-114\r -2 *0x\[a-f0-9\]* - 0x\[a-f0-9\]* at .*i386-thr-callback.S:44-45\r -3 *0x\[a-f0-9\]* - 0x\[a-f0-9\]* at .*i386-thr-callback.S:85-89\r -4 *0x\[a-f0-9\]* - 0x\[a-f0-9\]* at .*i386-thr-callback.S:40-43\r -.*" "BTR listing for thread 3, 1.8" - -gdb_test "btr +" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*push.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r -=> *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*" " BTR of 1 for thread 3, 1.9" - -gdb_test "btr +" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*call.*" " BTR of 2 for thread 3, 1.10" - -#switch to thread 4 -gdb_test_multiple "thread 4" "switching to thread 4" { - -re ".*Switching to thread 4.*mybarrier.*$gdb_prompt $" { - pass "switch to thread 4, 1.11" - } - timeout { - fail "switching to thread 4 (timeout), 1.11" - } -} - -#trace for thread 4 -gdb_test "btr list /lf" " -1 *in mybarrier at.*i386-thr-callback.S:112-114\r -2 *in th_c at.*i386-thr-callback.S:56-57\r -3 *in call_C at.*i386-thr-callback.S:94-98\r -4 *in th_c at.*i386-thr-callback.S:52-55\r -.*" "BTR listing for thread 4, 1.12" - -gdb_test "btr /m 1" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*push.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r -=> *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*" " BTR of 1 for thread 4, 1.13" - -gdb_test "btr +" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*call.*" " BTR of 2 for thread 4, 1.14" - -#switch to thread 5 -gdb_test_multiple "thread 5" "switching to thread 5" { - -re ".*Switching to thread 5.*mybarrier.*$gdb_prompt $" { - pass "switch to thread 5, 1.15" - } - timeout { - fail "switching to thread 5 (timeout), 1.15" - } -} - -#trace for thread 5 -gdb_test "btr list /fa" " -1 *0x\[a-f0-9\]* - 0x\[a-f0-9\]* in mybarrier\r -2 *0x\[a-f0-9\]* - 0x\[a-f0-9\]* in th_d\r -.*" "BTR listing for thread 5, 1.16" - -gdb_test "btr +" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*push.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r -=> *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*" " BTR of 1 for thread 5, 1.17" - -gdb_test "btr +" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*call.*" " BTR of 2 for thread 5, 1.18" - - gdb_test "btr +" " - *0x\[a-f0-9\]* :\[\[:blank:\]\]*push.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*mov.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*leave.*\r - *0x\[a-f0-9\]* :\[\[:blank:\]\]*ret.*\r" " BTR of 3 for thread 5, 1.19" - -} else { - note "Platform not supported" - untested allthreads_trace.exp -} diff --git a/gdb/testsuite/gdb.btrace/amd64-thr-callback.S b/gdb/testsuite/gdb.btrace/amd64-thr-callback.S deleted file mode 100755 index 871f76d..0000000 --- a/gdb/testsuite/gdb.btrace/amd64-thr-callback.S +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright 2012 Free Software Foundation, Inc. -# -# Contributed by Intel Corp. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# -############### -# threads.c calls th_a(), th_b(),th_c() and th_d() as callback methods -# for 4 threads being created. -############### - - - .globl th_a - .type th_a, @function hooks/post-receive -- Repository for Project Archer.