We consider the pricing of both fixed rate and floating rate risky debts when the value of a firm is governed by a Markov-modulated generalized jump-diffusion model with the jump component described by a completely random measure process with a Markov-switching compensator; that is, the compensator switches over time according to the states of an economy modelled by a continuous-time Markov chain. We shall employ the well-known tool in actuarial science, namely, the Esscher transform, to determine the price of the risky debts. We shall investigate consequences for the prices of the risky debts of various parametric specifications of the jump component. Sensitivity analysis for the prices of the risky debts with respect to various model parameters will be conducted. We also compare the pricing results obtained from our model with those from the celebrated Merton jump-diffusion model to illustrate the effect of correlated jump times and sizes on the prices of the debts.