The ultimate guide to this is Robert Wodrow's "The History of the Sufferings of the Church of Scotland from the Restoration to the Revolution" published about 1829 or earlier. This works through the events almost week by week throughout Scotland recording the details of everyone fined, or arrested, or transported or slain. I have gone through the Dumfriesshire material in part, though most of my research using this was for Renfrewshire and Lanarkshire. It is obtainable in National Library of Scotland, Mitchell Library Glasgow, and British Library in London, but obviously not an easy source to get hold of.
Secondly you can get names from the Scottish Records Office calendars the Register of the Privy Council, which gives the names of fugitives and their fate if captured. Most big libraries in Scotland have a set. The situation in Dumfriesshire was particularly bad, with many of the proscribed surnames fleeing the country for fear of being arrested merely by similarity of name, and by 1688/9 you find whole communities with only women and children, no males of certain surnames. Welsh is a particular example, numbering not only one of the largest numbers of martyrs for a single name, but the virtual disappearance of males of that name from Dumfriesshire by the late 1680s.
Lastly there are the two books by John Thompson - A Cloud of Witnesses published 1871 and The Martyr Graves of Scotland 1875, which attempt to record all this information nationally.