Do you want to record the sound of your drum machine, or do you want to use it to trigger GB's sounds?
For the latter - set GB's tempo to the same as the drum machine, create a software instrument track, pick a drum set from the internal instruments, hit record and play your loop from the drum machine. Afterwards, shift the recorded region back and forth until it coincides with GB's bars, cut it so that it fits an integer number of bars, and select "Add to Loop Library ..." from the menu.