(a) As used in this section, the term "child" includes any person for whom an order or judgment for child support has been entered in this or another state.
(b) Even if a trust contains a spendthrift provision, or if the beneficiary's interest is a discretionary trust interest as defined in G.S. 36C-5-504(a)(2) or a protective trust interest as defined in G.S. 36C-5-508, a beneficiary's child who has a judgment or court order against the beneficiary for support or maintenance may obtain from a court an order attaching present or future distributions to or for the benefit of the beneficiary. The court may limit the award to relief that is appropriate under the circumstances.